I was requested by one of my colleagues to get a decent histogram output in ignition. He didn’t care for some characteristics of barchart and wanted more. By this time I’d had some experience with JFreeChart, so I looked up what was available there. When I included
I had no problem, great! But as soon as I tried to declare
Histdataset=HistogramDataset()
or
chart = ChartFactory.createBarChart(plotTitle,…
I get the following errors:
NameError: name ‘HistogramDataset’ is not defined
NameError: name ‘ChartFactory’ is not defined
Declaring an empty dataset is about the easiest thing you can do. Since the command ‘HistogramDataset’ failed, I’m thinking this part of JFreeChart may not be implemented in the underlying layers of ignition.
If the packages weren't available, you'd get an error on the import statement. The actual cause is Jython's slightly funky import statement behavior - check @pturmel's excellent explanation here: