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

100% stacked area color field and sorting of datasource

2 Answers 42 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 29 Dec 2016, 04:55 AM

I have two issues with the following 100% stacked area chart:

http://jsbin.com/dofuxudome/1/edit?js,output

1) How can I sort the data source so that second sort field is used?

2) How can I color the areas using the colorField?

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 29 Dec 2016, 12:26 PM
Hi Morten,

Up to the questions
1). By default, the grouping overrides the sort order. Therefore to achieve the expected outcome I would suggest the following approach: 
- Group by the "sort" field;
- Sort by the "date" field;
- Use the series.name option to display the ranges in the legend.
For your convenience I updated the provided example - http://dojo.telerik.com/@Iliana/OParU

2). Please check the following forum thread which discusses the same scenario: 

http://www.telerik.com/forums/series-colors-with-grouped-datasource#9BBlR7rNSku2efk-kgY9Aw

Regards,
Iliana Nikolova
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 30 Dec 2016, 10:29 AM
Thanks Iliana. All my trouble solved :-)
Tags
Charts
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Iliana Dyankova
Telerik team
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or