Skip to content

Settings and activity

1 result found

  1. 68 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Mathew Weaver commented  · 

    As Josh said, getting the viewable chart data is fairly easy. Here is a code snippet:

    var csv = "";

    for (var i = 0; i < chart.series.length; i++) {
    if (chart.series[i].name == 'Navigator') continue;
    var series = chart.series[i];
    for (var j = 0; j < series.data.length; j++) {
    if (series.data[j] != undefined && series.data[j].x >= series.xAxis.min && series.data[j].x <= series.xAxis.max) {
    csv = csv + series.name + ',' + Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', series.data[j].x) + ',' + series.data[j].y + '\r\n';
    }
    }
    }

    An error occurred while saving the comment
    Mathew Weaver commented  · 

    I am looking to do the same thing that you describe. Did you ever get any further with this? Would you mind sharing a code snippet that gets the viewable chart data into a data URI?

    Mathew Weaver supported this idea  ·