Hi,
Can we have the control of Bar width in Bar chart?. in my case i want to adjust bar width. Bu t in docs i don’t see any custom control over it. it is based on the DIV container width.
Hi
There is “width” property:
docs.dhtmlx.com/chart__dhxbar.html (point 7)
dhtmlx.com/docs/products/dht … tyles.html
Or do you mean changing width dynamically?
by default, it takes the maximum possible width for all the bars based on the DIV width.
When label values are more than bar width (refer : Vertical Labels overlapping.png) it overlaps with adjacent bars.This is the problem. Can you provide a possible solution?
You can reduce a font size, or rotare tooltips to 90 degrees.
If you increase the width of the chart container, it will make bars more thicker. But all of them will be equal in width (it is chart feature)
Can we apply styles to the bar labels specifically? because when i checked the css it is common for all the x, y axis labels. How can we apply styles specifically for that ? can you provide a sample for this fix.
You can use label template property (point 9):
docs.dhtmlx.com/chart__dhxbar.html
I.e. apply any other text style (color - below):
label: function(obj){
return '<span style="color: red">'+obj.id+'</span>'
},