Hello! I’m currently working with the Timeseries Charts script in the reporting module. I already have the code for dynamic charts, handling the legend dynamically, and adding as many RangeAxis as needed.
My problem is that I don’t know how to specify the RangeAxis I want a pen to use. Could someone help me?
The XYPlot class you must be using to manipulate the pens expects there to be a 1:1:1:1 relationship between datasets, domain axes, range axes, and renderers.
All of these must be specified at index zero, and these become the defaults for any datasets that don't have a specific assignment for one of the other items.
Therefore, place pens in the dataset that has the index corresponding to the range axis you've assigned to the XYPlot.
Series within each dataset. All of the series in a dataset share domain axis, range axis, and renderer. Beware: JFreeChart "datasets" are not the same class as Ignition's own "datasets".
Hello once again. I've already made some progress but I haven't quite made it I need to know how to remove series from a dataset. While reviewing the API, I noticed that there’s a removeSeries(Comparable seriesKey) method for DefaultXYDataset, but it’s not working for me. Here’s my test:
Just construct however many datasets you need (DefaultXYDataset I suspect) for all of the combinations of axes for your data, assigning them to the plot, starting with subscript zero.
I understand what you're trying to tell me, but when I’ve tried to do that, I always get an error. The method I used to do this was the addSeries(Comparable seriesKey, double[][] data) of the DefaultXYDataset() class.
Isn’t that the right function? Do you know how this is done?
This made me think that perhaps it was easier to remove series than to add them. As the graph is dynamic I have to configure at the beginning the maximum number of PENs that I can use. Then I will always have in the index 0 dataset the configuration of all the series. I can clone that dataset and remove from there the series that I don't need. Do you think I should keep trying to figure out how to add series to a data set?
I really appreciate your help and forgive me for so much trouble