This is a migrated thread and some comments may be shown as answers.

Getting aggregated series data

3 Answers 45 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 16 Apr 2020, 12:31 PM

We have a stacked area or line chart in which the categoryAxis is a date.  In each series, values are aggregated (summed).

We are wanting to implement an export to CSV of the data which makes up the displayed chart. I've looked through all of the chart options, but cannot find a way to get those aggregated series values. 

Is there any way to do this without having to write my own aggregation logic?

 

 

3 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 20 Apr 2020, 06:44 AM

Hi Robert,

In general, the engine used for the export to SVG exports "what it sees". Therefore, having aggregated values in the series should be exported without any additional intervention. Check out the following example that implements Date category axis along with aggregated series:

https://dojo.telerik.com/OQifexIN

Let me know in case the scenario you are working on has additional logic that is implemented.

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Bob
Top achievements
Rank 1
answered on 20 Apr 2020, 11:05 AM

I'm not interested in an SVG image.

I want *CSV*, comma separated values, to import into Excel.

0
Tsvetomir
Telerik team
answered on 20 Apr 2020, 12:14 PM

Hi Robert,

I apologize for the misinformation. 

Indeed, the aggregates for the series are not readily available via the options of the series. This is due to the fact that they are calculated dynamically during the render event of the widget and are directly drawn on the surface.

However, you could access the aggregate operator itself and the data for the series via the options. The actual aggregated values have to be explicitly calculated.

var chart = $("#chart").getKendoChart();
var series = chart.options.series[0];

// calculate aggregate based on the data and aggregate from the series.

I hope you find this helpful.

 

Regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Charts
Asked by
Bob
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Bob
Top achievements
Rank 1
Share this question
or