简体   繁体   English

HIghcharts,按钮文本未定义

[英]HIghcharts, button text undefined

I've trawled through the API and can't find where to define the alt text of custom nav buttons.我已经 浏览了 API ,但找不到定义自定义导航按钮的替代文本的位置。

Can anyone help out?任何人都可以帮忙吗?

未定义的替代文字

Here's a sample of what I've got in my exporting options:这是我的导出选项中的示例:

exporting: {
    buttons: {
        contextButtons: {
            enabled: false,
            menuItems: null
        },
        contextButton: {
            menuItems: null,
            symbol: 'url()',
            symbolX: 1,
            symbolY: 1,
            width: 1,
            height:1,
            onclick: function() {
                return false;
            }
        },
        'downButton': {
            symbol: 'url(img/glyphicons/glyphicons_200_download.png)',
            symbolX: 13,
            symbolY: 13,
            width: 26,
            height:26,
            onclick: function() {
                this.exportChart();
            }
        }
    },
    type: 'image/png'
},

_titleKey is what you want. _titleKey就是你想要的。 See http://jsfiddle.net/x36qR/1/ for an example.有关示例,请参见http://jsfiddle.net/x36qR/1/

make sure you define lang: { } parameter in the chart object确保在图表对象中定义 lang: { } 参数

then use the _titleKey: "example" in the lang to set the desired title然后使用 _titleKey: "example" 在 lang 中设置所需的标题

  .highcharts({

        lang:{
            example: "Title Name"
        },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM