Remove Export and print button plugin on highchart chart

后端 未结 4 1954
温柔的废话
温柔的废话 2021-02-04 01:47

I am using MVC and currently working with highchart

I am using the Exporting.js so users can print or export the highchart chart. I have two charts in a view and I would

4条回答
  •  情歌与酒
    2021-02-04 02:12

    See the following 'Exporting module is loaded but disabled' for how to disable exporting. An explanation of all of the modifiable options for exporting can be found here.

    EDIT

    It looks like you are using DotNet.Highcharts. Here is an example on how to use and set the exporting features:

    .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
    })
    

提交回复
热议问题