开发者

Adding menuItems to a new button affects other button

I'm trying to add a new button (found example on http://jsfiddle.net/fXHB5/3496/) I want this button to have menuItems viz., 'column', 'line', 'bar', 'pie' When I try to add the above menuItems to new button called 'testButton' it changes the menuItems of 'exportButton' to same

Heres my code

exporting: {
  buttons: {
  testButton: {
    menuItems: [{
      text: 'Column',
      onclick: function() {
        //ChangeChart('co开发者_如何学编程lumn');
      }
    },
    {
      text: 'Line',
      onclick: function() {
        //ChangeChart('line');
      }  
    }],
    symbol: 'diamond',
    x: -62,
    symbolFill: '#B5C9DF',
    hoverSymbolFill: '#779ABF',
    _titleKey: 'printButtonTitle'                
  },          

  exportButton: {
    menuItems: [,,,,{
      text: 'Download CSV',
      onclick: function() {
        //DownloadJSON2CSV(dataSeries);
      }
    }]
   } //exportButton ends here
   } //buttons ends here
  } //exporting ends here
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜