如何在新标签中打开高级图表的信用URL

Sur*_*raj 9 javascript highcharts

如何url在新标签中打开highcharts信用?

credits: {
    enabled: true,
    text: 'text',
    href: 'url'
},
Run Code Online (Sandbox Code Playgroud)

Mar*_*ark 12

在图表加载事件中绘制图表后,您可以重新定义信用点击处理程序:

    chart: {
        events:{
            load: function() {
                this.credits.element.onclick = function() {
                    window.open(
                      'http://www.example.com',
                      '_blank'
                    );
                 }
            }
        }                
    },
Run Code Online (Sandbox Code Playgroud)

小提琴这里.


小智 5

这是对我有用的解决方案。

credits: {
    enabled: true,
    text: 'text',
    href: 'javascript:window.open("http://www.example.com/", "_blank")'
},
Run Code Online (Sandbox Code Playgroud)