删除highchart图表上导出和打印按钮插件 [英] Remove Export and print button plugin on highchart chart

查看:134
本文介绍了删除highchart图表上导出和打印按钮插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MVC和目前与highchart工作

我使用的是Exporting.js因此用户可以打印或导出highchart图。
我有一个视图中的两个图表,我想禁用打印和导出在图表中的一个。我该怎么办呢?

Exporting.js是全自动给这些图表2按钮选项。

谢谢dvance

正确的解决方法:

  .SetExporting(新导出{启用=假,EnableImages = FALSE});


解决方案

请参阅下面的<一个href=\"http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/exporting/enabled-false/\">'Exporting模块加载但对于如何禁止出口禁用。所有的出口可修改选项的说明可以在这里找到

修改

看起来你正在使用DotNet.Highcharts。下面是关于如何使用和设置出口功能的例子:

  .SetExporting(新出口
{
    按钮=新ExportingButtons
        {
            ExportButton =新ExportingButtonsExportButton
                {
                    ALIGN = Horizo​​ntalAligns.Right,
                        // BackgroundColor中&LT; - 不知道如何设置还
                        BORDERCOLOR = Color.Black,
                        BorderRadius = 3,
                        边框宽度= 1,
                        启用=真,
                        身高= 35,
                        HoverBorderColor = Color.Red,
                        HoverSymbolFill = Color.Black,
                        HoverSymbolStroke = Color.Black,
                        //点​​击时
                        //的MenuItems
                        SymbolSize = 25,
                        SymbolX = 18,
                        SymbolY = 18,
                        VerticalAlign = VerticalAligns.Top,
                        宽度= 35,
                        Y = 10,
                        X = -50
                },
                PrintButton =新ExportingButtonsPrintButton
                {
                    ALIGN = Horizo​​ntalAligns.Right,
                        // BackgroundColor中&LT; - 不知道如何设置还
                        BORDERCOLOR = Color.Black,
                        BorderRadius = 3,
                        边框宽度= 1,
                        启用=真,
                        身高= 35,
                        HoverBorderColor = Color.Red,
                        HoverSymbolFill = Color.Black,
                        HoverSymbolStroke = Color.Black,
                        //点​​击时
                        //的MenuItems
                        SymbolStroke = Color.Teal,
                        SymbolSize = 25,
                        SymbolX = 18,
                        SymbolY = 18,
                        VerticalAlign = VerticalAligns.Top,
                        宽度= 35,
                        Y = 10,
                        X = -15
                }
    },
        启用=真,
        EnableImages = TRUE,
        文件名=HomeChart
        TYPE =图像/ PNG
        URL =htt​​p://export.highcharts.com
        宽度= 800
})

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 like to disable print and export on one of the chart. How can I do that?

Exporting.js is automaticly giving charts these 2 button options.

Thanks in dvance

Correct solution:

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

解决方案

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

这篇关于删除highchart图表上导出和打印按钮插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆