miloschuman / yii2-highcharts

Highcharts widget for Yii 2 Framework
http://www.yiiframework.com/extension/yii2-highcharts-widget/
MIT License
166 stars 63 forks source link

Export to CSV #63

Open prabowomurti opened 6 years ago

prabowomurti commented 6 years ago

Here is how I make the "Download to CSV" button appears.

<?=$this->registerJsFile('https://highcharts.github.io/export-csv/export-csv.js', ['depends' => HighchartsAsset::className()]);?>

<?= Highcharts::widget([
    'scripts' => [
        'modules/exporting',  // adds exporting support        
    ],
    'options' => [
        'credits' => ['enabled' => false],
        "chart" => [
            "type" => "column",
            "height" => 500
        ],
        "title" => [
            "text" => "New Member Registration Progress",
        ],
        'series' => $series,
    ],
]);

What is the best practice to include the "Download as CSV" menu? Since the repository is on deprecation notice. Thank you.