j789
asked on
Vis.js graph3d onclick event
Hi, has anyone used the vis.js graph3d library? If so do you know how to capture the z value when clicking a bar? Tried the code below in the graph options but doesn't work? Thanks
tooltip: function onclick(point) {
alert(point.z);
}
ASKER
Thanks for the response Bugada.
Do you know how to make the alert(point.z) trigger when the bar is clicked instead of it being triggered onmouseover?
Thanks
Do you know how to make the alert(point.z) trigger when the bar is clicked instead of it being triggered onmouseover?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help Bugada.
ASKER
Do you know how to control the colour of the bars? For example I would like to show the bars for warehouse a in blue and the bars for warehouse b in red (where the warehouses are on the y axis). Then is possible use a different shade of blue and red to indicate the values. Do you know if this can be done? Thanks
Try adding data to dataSet assigning different fieldId depending on the wharehouse. Then using those ids, you can customize the css to give the color you want to bars.
Just my 2 cents, cause I've never done it before.
Just my 2 cents, cause I've never done it before.
Example
Open in new window