How to dynamically add point placement and add points to a fixed column chart (tall charts)

when we add more data how to dynamically set shim and point placement This is a demo: http://jsfiddle.net/5vfojgsx/

This is my question:

'http://jsfiddle.net/b135pxtw/'

      

thanks for the help

+3


source to share


1 answer


Let me explain how it works.

pointPlacement

is the distance from the center of each mark (0,1,2)

. So, positive means "right", "negative" means "left" So when you have 10 runs you should use spaces like (-0.4, -0.2, 0, 0.2, 0.4)

. For 12, you can use (-0.5, -0.3, -0.1, 0.1, 0.3, 0.5)

.



pointPadding

is the width of each column, so if you need to align two columns, you must use two values (0.4, 0.45)

, like I used . This value should be less when using more data for columns that will not overlap with their neighbor, something like (0.45. 0.5)

. You can see the difference here and here .

You can use these two parameters to dynamically position each column according to your data.

0


source







All Articles