Posted 24 June 2018, 10:19 pm EST
I am going to insert a chart on sheet2.
But the chart references sheet1’s data.
can I create this chart?
Forums Home / Spread / SpreadJS
Posted by: arnoldbendaa on 24 June 2018, 10:19 pm EST
Posted 24 June 2018, 10:19 pm EST
I am going to insert a chart on sheet2.
But the chart references sheet1’s data.
can I create this chart?
Posted 25 June 2018, 5:48 am EST
Hello,
You can simply set the data range formula for chart with cross sheet reference. For example:
var sheet= spread.getSheet(0);
var chart = sheet.charts.add('Chart1', GC.Spread.Sheets.Charts.ChartType.columnClustered, 350, 20, 600, 400, "Sheet2!A1:D4");
The above code will add a chart to first sheet while the data is on the second sheet.
Thanks,
Deepak Sharma
Posted 25 June 2018, 5:55 am EST
when I do so, the chart title is first cell of selection.
so the chart that draw above code is different with the chart that copy with ctrl+c.
Posted 28 June 2018, 6:13 am EST
Hello,
I added the chart using the data from another sheet and also copied the same chart to another sheet. I could not find any difference. Please refer to the attached video.
Please provide me a sample application along the steps to further debug this issue.
Thanks,
Deepak SharmaAddingChartsCopyingCharts.zip