从图表中删除Highchart.com链接

时间:2016-02-02 10:47:09

标签: jquery symfony highcharts

我使用Highchart来设计图表,但链接hightchart.com始终可用的问题,

我是用户symfony,这是我的代码:

 $ob = new Highchart();
    // ID de l'élement de DOM que vous utilisez comme conteneur
    $ob->chart->renderTo('chart');

    $ob->chart->type('column');

    $ob->yAxis->title(array('text' => "nombre , sms, fax"));

    $ob->xAxis->title(array('text' => "mois"));
    $ob->xAxis->categories($horizontals);

    $ob->tooltip->headerFormat('<span style="font-size:10px">{point.key}</span><table>');
    $ob->tooltip->pointFormat('<tr><td style="color:{series.color};padding:0">{series.name}: </td><td style="padding:0"><b>{point.y} </b></td></tr>');
    $ob->tooltip->footerFormat('</table>');
    $ob->tooltip->shared(true);
    $ob->tooltip->useHTML(true);

这是结果

enter image description here

我的问题是如何删除两个元素1和2

感谢您的帮助

3 个答案:

答案 0 :(得分:6)

在声明Highchart对象

时设置此参数
credits: {
    enabled: false
},

以下是我的示例jsfiddle.net/mxx8xpnL

Removing highcharts.com credits link

答案 1 :(得分:1)

删除链接,您可以使用:

 credits: {
    text: 'you text',
    href: false,
 }

答案 2 :(得分:0)

$ob->credits->enabled(false); // For credits