guideline example data javascript asp.net-mvc charts highcharts

javascript - example - Eliminar Exportar e imprimir el complemento del botón en el gráfico de Highchart



legend highcharts (4)

Consulte lo siguiente "El módulo de exportación está cargado pero deshabilitado" para saber cómo deshabilitar la exportación. Puede encontrar una explicación de todas las opciones modificables para exportar aquí .

EDITAR

Parece que estás usando DotNet.Highcharts. Aquí hay un ejemplo sobre cómo usar y establecer las funciones de exportación:

.SetExporting(new Exporting { Buttons = new ExportingButtons { ExportButton = new ExportingButtonsExportButton { Align = HorizontalAligns.Right, //BackgroundColor <-- Don''t know how to set yet BorderColor = Color.Black, BorderRadius = 3, BorderWidth = 1, Enabled = true, Height = 35, HoverBorderColor = Color.Red, HoverSymbolFill = Color.Black, HoverSymbolStroke = Color.Black, //Onclick //MenuItems SymbolSize = 25, SymbolX = 18, SymbolY = 18, VerticalAlign = VerticalAligns.Top, Width = 35, Y = 10, X = -50 }, PrintButton = new ExportingButtonsPrintButton { Align = HorizontalAligns.Right, //BackgroundColor <-- Don''t know how to set yet BorderColor = Color.Black, BorderRadius = 3, BorderWidth = 1, Enabled = true, Height = 35, HoverBorderColor = Color.Red, HoverSymbolFill = Color.Black, HoverSymbolStroke = Color.Black, //Onclick //MenuItems SymbolStroke = Color.Teal, SymbolSize = 25, SymbolX = 18, SymbolY = 18, VerticalAlign = VerticalAligns.Top, Width = 35, Y = 10, X = -15 } }, Enabled = true, EnableImages = true, Filename = "HomeChart", Type = "image/png", Url = "http://export.highcharts.com", Width = 800 })

Estoy usando MVC y actualmente estoy trabajando con Highchart

Estoy usando Exporting.js para que los usuarios puedan imprimir o exportar el gráfico de Highchart. Tengo dos gráficos en una vista y me gustaría desactivar la impresión y exportación en uno de los gráficos. ¿Cómo puedo hacer eso?

Exporting.js está automáticamente dando gráficos a estas 2 opciones de botón.

Gracias en dvance

Solución correcta:

.SetExporting(new Exporting { Enabled = false, EnableImages = false });


Puede desactivar ambos botones (es decir, toda la sección de exportación) simuladamente por,

exporting: { enabled: false }

También puedes inhabilitar uno o ambos de esta manera,

exporting: { buttons: { exportButton: { enabled:false }, printButton: { enabled:false } } }


La primera opción que mencionas:

exporting: { enabled: false }

rompe el objeto Highcharts, si lo está usando en un escenario en el que reutiliza el contenedor html (es decir, actualizar datos).

la única opción viable para mí en ese escenario es combinar ambos:

optionsMini.exporting = { enabled: false, buttons: { exportButton: { enabled: false }, printButton: { enabled: false } } }


El siguiente funciona para MVC 5 y Highsoft.Highcharts Lo agregué antes de esta línea: Title = new Title { Text = "charts" },

Exporting = new Exporting { Enabled = false },