I would like to hide the context menu of my Easy Chart component,
but let the user enable/disable the zoom, pan, mark functions from buttons of my own. I let me print the methods of the EasyChart component in a python script, but I couldn’t find in there any method whose name hints to what I need.
Thanks in advance,
EasyChart has a setMode(m) method that drives that behavior. Unfortunately, there’s no corresponding getMode() function to obtain the current state. Which you need to draw the radio buttons correctly, and otherwise adjust your GUI to interact with the chart. This annoyed me enough to include getMode() in the NoteChart and EasyNoteChart components, for this same reason.
Thanks pturmel. Is there any documentation about the codes needed by the setMode method to change the chart behaviour?
[quote=“pgmo”]Is there any documentation about the codes needed by the setMode method to change the chart behaviour?[/quote]Not documented that I can find. Can be introspected from com.inductiveautomation.factorypmi.application.components.chart.PMILineChartPanel.
[ul][li]MODE_ZOOM = 0[/li]
[li]MODE_PAN = 1[/li]
[li]MODE_MARK = 3[/li]
[li]MODE_XTRACE = 4[/li][/ul]
Ok, thank you so much pturmel.