java - JFreeChart making XYSeriescollection iterable -
background info
i wanted create quasi dynamic dataset containing few different data series share same timeframe extent. since never know when new series may required or old 1 updated i'm making method takes generic entry name, time, score plot chart.
the actual problem
i have noticed can not iterate through xyseriescollection
suggest class not implement iterable. guess could modify original files implement interface, bit concerned jfreechart appears great library perhaps there reason why implementation not done?
summary:
is ok modify code - safe, has tried it, can cause issues within library, etc?
is there better way add behaviour editing sources, override of kind?
what different approach? i'm not adamant solution, can not alter input data , have no way of knowing in advance except arrive @ point , has same format(since it's object of class know)
xyseriescollection#getseries()
returns list
iterable
.
xyseriescollection dataset = new xyseriescollection(…); list<xyseries> list = dataset.getseries(); (xyseries s : list) { //alter s desired }
note collection
returned in unmodifiable, can alter elements individually. use xyseriescollection
api alter list
itself.
Comments
Post a Comment