Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting an series property improvement #45

Closed
czytelny opened this issue Sep 7, 2013 · 1 comment
Closed

Setting an series property improvement #45

czytelny opened this issue Sep 7, 2013 · 1 comment

Comments

@czytelny
Copy link

czytelny commented Sep 7, 2013

It would be nice to have possibility to create a chain of settings for an series.
Currently I can set only one parameter:
chart.addSeries( ... ).setLineColor(Color.red);
And to be honest I don't have idea how to set another one :)

However, if setLineColor() (and other) will returns Series I can write something like:
chart.addSeries( ... ).setLineColor(Color.red).setMarker(...);
and so on.

If there is another way to achieve this let me know.

@timmolter
Copy link
Member

Hi, that's a great recommendation.

You can do it like this:

Series series = chart.addDateSeries("Model 77", xData, yData);
series.setLineColor(SeriesColor.RED);
series.setMarkerColor(Color.BLACK);

But I now changed the code as you suggested. SNAPSHOT version as before if you;d like to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants