Labels in rangechart

Hi,

I’m planning to use the Webix rangechart.
I’m looking at the example in here: Code Snippet

The problem I find is that when the range is too big and there are too many data points in the line chart, labels overlap and they become unreadable. Is there a way to set labels so they don’t overlap? For example: show less labels?

Thanks

Hello,

Webix doesn’t control overlapping labels during chart rendering. But you can show less labels by providing extra logic in a template function, e.g. show each fifth label:

template:function(obj){
     var index = $$("sensor_chart").getIndexById(obj.id);
     var templ = "";
     if(index%5 === 0) 
         templ = obj.label;
     return templ;
}         

Please, check the snippet: https://snippet.webix.com/6loqctrk

Thx Helga! I’ll give it a try.

Cheers!