PDA

View Full Version : how to change LineChart text location and set the text color?



e3133d3
28 Dec 2011, 3:12 AM
Hi,
I'm creating graphs using the LineChart config class. I have 2 questions:
1. I'm trying to set the text location to the bottom of the chart but couldn't find a way to do so. any idea how?
2. How to set the text color to different than the line in the chart?
In the attached screen shot the chart graph line is red, and also the text "Average KiloBytes" is red.

Here is the code I'm using:


LineChart line = new LineChart();
line.setAnimateOnShow(false);
line.setText("Average KiloBytes");
line.setColour("#FF0000"); //Red
LineDataProvider lineProvider = new LineDataProvider("x-val", "y-val");
lineProvider.bind(store);
line.setDataProvider(lineProvider);