David,
Range class, great concept. I'd like to you also add setLowerBound and setUpperBound methods so the Range object can be reused without allocation. I've been using RangeInfo class in the dynamic data objects (the data refreshes every sec or so). So, it'll be a waste of resources to reallocate the Range object again and again.
Thanks
Mudit
Range class, great concept, need two more methods
Re: Range class, great concept, need two more methods
Hi Mudit,
Adding those methods would cause a problem elsewhere, it would be possible to modify the axis range without the chart being notified, like this:
plot.getDomainAxis().getRange().setUpperBound(42.0);
So I need the object returned by getRange() to be immutable. Maybe there is a way around that, I'll look into it after I've released 0.9.5.
Regards,
Dave Gilbert
Adding those methods would cause a problem elsewhere, it would be possible to modify the axis range without the chart being notified, like this:
plot.getDomainAxis().getRange().setUpperBound(42.0);
So I need the object returned by getRange() to be immutable. Maybe there is a way around that, I'll look into it after I've released 0.9.5.
Regards,
Dave Gilbert
Re: Range class, great concept, need two more methods
Dave,
I always implement RangeInfo class for all my datasets. The reason is simple as my dataset class already knows the lower and upper bounds and the RangeInfo methods are helpful in returning those values. It definitely cuts down the plotting time as the plot doesn't have to loop thru the entire dataset.
Now the getValueRange() method returns the Range object. But since there is no setting up lower and upper values in this Range class, I can't reuse the Range object in my dataset.
My datasets are being used to plot intraday tick by tick stock charts. So, each tick triggers request for new plot. I've tried to optimize as much as possible so no new objects are created for each plot.
Thanks
Mudit
I always implement RangeInfo class for all my datasets. The reason is simple as my dataset class already knows the lower and upper bounds and the RangeInfo methods are helpful in returning those values. It definitely cuts down the plotting time as the plot doesn't have to loop thru the entire dataset.
Now the getValueRange() method returns the Range object. But since there is no setting up lower and upper values in this Range class, I can't reuse the Range object in my dataset.
My datasets are being used to plot intraday tick by tick stock charts. So, each tick triggers request for new plot. I've tried to optimize as much as possible so no new objects are created for each plot.
Thanks
Mudit