I have a requirement where my data values are two-dimensional objects I must draw in the chart (scatter):
On this chart, I have two values (red, and green), each one consisting of a rectangle with (x1,y1)-(x2-y2) coordinates.
Do you know how this can be achieved using the ZingChart Library? Is it even possible? If not, do you know an alternative javascript library I can use to implement this functionality?
Thanks!
I'm on the ZingChart team, and I'm happy to help you out. This is certainly possible using marker objects of type "poly". In the
points
array of the marker object, you need to specify all four points of the rectangle, which, altogether, would look something like this:Now, if you put your (x1, y1) values and (x2, y2) values into two arrays, you could do something like this to create the necessary array of 4 sets of coordinates:
Then, in ZingChart, you could call your function from within the chart JSON, like this:
You can check out all of that in this demo.
I'm not sure what your data looks like, but you should be able to see from the above example that ZingChart is pretty flexible, and that with a dash of creativity, you can accomplish a lot, especially when you use JavaScript in conjunction with ZingChart.
Let me know if I can do anything else to help!