Home › forums › Chart Support › How to make a vertical bar graph with horizontally draggable bars?
Tagged: bar graphs, draggable
Hello! I was wondering, could you please link me to a CanvasJS fiddle that shows a vertical bar graph with columns that the user can click on and drag horizontally? I have seen your posts for horizontally bars graphs that can be dragged left to right, and vertical bar graphs that can be dragged up and down, but I need a combination of both: a vertical bar graph whose columns can be dragged left and right. I need to do this in my React.js version of CanvasJS. Thanks, I love your technology!
It is not possible to drag column chart horizontally as of now. However, you can use Error chart to achieve the above requirement. Please take a look at this JSFiddle for an example.
Hi Idranil! Thanks for your help…however, that Fiddle does not do what I need. I need the column at 10 to move left or right to 12 or 8, but all that Fiddle does is make the column thicker, so that it overlaps with 8 and 12. I need to move the whole column to the left, not just make it wider.
Is that possible?
Please take a look at this JSFiddle.
Hey Indranil! This looks great. There seems to be one small bug though — the columns get really thin and then really wide whenever the column you’re dragging overlaps with its first neighbor to the left or right. Is there any way to prevent that?
You must be logged in to reply to this topic.