简体   繁体   English

Google电子表格中的Highcharts数据显示了一个系列的折线图

[英]Highcharts data from Google spreadsheet show line chart for one series

In Excel i was able to draw this chart from data 在Excel中,我能够从数据中绘制此图表

Chart Image 图表图像

I want to convert this chart to highcharts. 我想将此图表转换为图表。 Data is in Google spreadsheet and I am using data module to get data directly from Google spreadsheet and show over chart. 数据在Google电子表格中,我正在使用数据模块直接从Google电子表格中获取数据并显示在图表上。 Here is code doing it. 这是执行此操作的代码。

$('#solar_chart_one').highcharts({
        chart: { type: 'column' },
        data: {
            googleSpreadsheetKey: '0Alz3h5kIx8cWdFNHbmxqbXRILV9kbkd4V0oyX0ZyMWc'
        },

         plotOptions: {
            column: {
                stacking: 'normal'
            }
        },
        credits: {
          enabled: false
        },
        title: {
            text: 'Power Bill Saving Options'
        }

}); });

Here is JsFiddle for this code 这是此代码的JsFiddle

Any help on how to make it look alike? 对如何使其看起来相似有帮助吗?

I would use the callback function and set the series you want to be a line to be a line like so: 我将使用回调函数并将要成为line的系列设置为如下line

function (chart) {
    chart.series[2].update({
        type: 'line',
        color: 'blue'
    });
}

I changed it to also be a blue line. 我将其更改为蓝线。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM