Parallel chart with CN1Charts.cn1lib

64 views
Skip to first unread message

porco...@gmail.com

unread,
Nov 4, 2013, 9:56:50 AM11/4/13
to codenameone...@googlegroups.com
Hi, i'll put in my app a parallel chart to show some data, that come from a servlet. I've seen that it easy to realize a pie or bar chart, but i want lines and points to realize a parallel chart (or something similir that i'll re-arrange) unfortunately the javadocs cannot provide me the informations i need, so anyone succeded in this operation? Any suggestion will be very helpfull.

I've a plan B in case this doesn't work (use WebBrowser component to a chart page created with google chart). 

Thank you!

Steve Hannah

unread,
Nov 4, 2013, 10:32:03 AM11/4/13
to codenameone...@googlegroups.com
The javadocs are minimal because they just wrap around the configuration options for flot, which are documented.  If you can figure out how to do it in javascript with flot (http://www.flotcharts.org/), then you should be able to just do the same thing with the Java API.

Steve


--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/cc99b488-1fe6-409c-9257-e3ac30525c65%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Steve Hannah
Web Lite Solutions Corp.

porco...@gmail.com

unread,
Nov 5, 2013, 4:01:51 AM11/5/13
to codenameone...@googlegroups.com
so i have to configure manually the x and y axis and then populate with points and lines in series to add everything to a chart object?

porco...@gmail.com

unread,
Nov 6, 2013, 9:03:30 AM11/6/13
to codenameone...@googlegroups.com
i managed to draw points connected, i'm adding point in a series, and creating different series then add all the series to the graph, the problem is that the series are connected, the graph show the end point of a series connected to the starting one of the next... also the graph have only one color, when every single series should have is own (but being connected i think it's treated like a single one)

any suggestion?

my code: 
        ChartBuilder b = new ChartBuilder();
        Chart chart = b.newBarChart(valArr, labelArr);
        Point p = new Point(xValue, yValue);
        listOfPoints.add(p); //here i add other points in a for

        Series s = new Series();
        s.data(listOfPoints);
        listOfSeries.add(s); //here i add other series

        chart.series(listOfSeries);

        ChartView v = new ChartView(chart);
        v.initLater();
Reply all
Reply to author
Forward
0 new messages