Are the histogram libraries of JFreeChart accessible?

We’re using Ignition 7.9.14.

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

import org.jfree.chart.ChartFactory

I had no problem, great! But as soon as I tried to declare
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.

Has anybody got some ideas?

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:

We use @JordanCClark statUtils to do Histograms with the standard bar chart and line.

Just for example, sorry had to blur out the numbers but you will get the general idea.