PDA

View Full Version : How to show line for zero value in barchart in extjs4.1



vijayakumar84
22 Jul 2013, 5:46 AM
Hi
Can anybody tell How to show line for zero value in barchart in extjs4.1.If value is greater than zero need to display bar.If it is zero need to show line or marker


Thanks

slemmon
25 Jul 2013, 9:03 AM
There's not a way out of the box to place a marker in place of a bar. Not sure what you mean by a line, though.

jdflores
25 Jul 2013, 9:44 AM
Can you provide more information? I do see a line when the value of the bar is zero (small but there).

45046

jdflores
25 Jul 2013, 11:20 AM
You can take a look at : http://jsfiddle.net/jdflores/wVCfx/

The only way I've found to create a marker on top of the bars that are zero is subscribing to the chart's boxready listener and looking at all the sprites of type rect which width is 1 (zero in value but one is the size of bar). I take the x, y coordinates of where this rect is being rendered and place another sprite on top of it. The result is a marker like this:

45048

abdellee
11 Nov 2015, 10:44 AM
in one of my Bar charts, i have a value #1 = 32 and value #2 is ZERO, the rest of the values are very big values like in millions.
the Bar with the value 32 and the Bar with Zero appears to have the same Bar appearance and the user can not differentiate.

is there a way to remove the zero value bar from the chart?

thanks,