Charts - Display colored area



I would like to display information about peak/offpeak hours on my chart. My dream would be to find a solution like on the screenshot below where this information is show in the background of the x axis. Is it possible ? 

Or maybe, do i need to use a second serie to display color area on the charts ?



Hi Sellar,

This isn’t something you can just turn on out of the box, but it should definitely be achievable.

It’s not currently possible to have a line series that changes colour at a certain point. We’ve recently added individual point styling to our bar / column series, but it isn’t something we offer on continuous such as the line series. However, you should be able to create this same effect using multiple line series.

With regards to the axis styling, you could definitely implement this yourself. There are methods on the axis that let you turn a data value into a screen coordinate. All you’d need to do is use these to find out the screen coordinates where you’d need to place your blue view and then hook into your chart’s panning delegate method, updating the blue area’s size / position as your chart pans.

Best regards,