Thanks for your reply
This is the code which i have used for my charts.
Here i can able to give colors to my lines but how can i manage to set the values on y-axis as we are getting values from database(any values we can expect),the code which you have sent is hard coded to a particular range(0,50),here i dont know the range excatly what i want is to get complete values upto which the graph line reaches
<%
ChartPostProcessor dataColor = new ChartPostProcessor() {
public void processChart(Object chart, Map params) {
CategoryPlot plot = (CategoryPlot) ((JFreeChart) chart).getPlot();
for (int i = 0; i < params.size(); i++) {
String colorStr = (String) params.get(String.valueOf(i));
plot.getRenderer().setSeriesPaint(i, java.awt.Color.decode(colorStr));
}
}
};
pageContext.setAttribute("dataColor", dataColor);
%>
Displaying in the
jsp using chartpostprocessor:
------------------------------------------------
<cewolf:chartpostprocessor id="dataColor">
<cewolf aram name="0" value='<%= "#000000" %>'/>
<cewolf aram name="1" value='<%= "#00FF00" %>'/>
<cewolf aram name="2" value='<%= "#990066" %>'/>
<cewolf aram name="3" value='<%= "#00FFFF" %>'/>
<cewolf aram name="4" value='<%= "#FF00FF" %>'/>
<cewolf aram name="5" value='<%= "#6600FF" %>'/>
<cewolf aram name="6" value='<%= "#990000" %>'/>
<cewolf aram name="7" value='<%= "#996600" %>'/>
<cewolf aram name="8" value='<%= "#99CC00" %>'/> </cewolf:chartpostprocessor>
could you please provide me any specified method if it is there to handle the values dynamically
find the image here:
----------------------
Please observe the above chart, if you didn't find the image open the url you will find an example chart
In the above chart first line in blue color exceeds the highest value shown in the graph ie 1500 ,how can i get the complete scale in order to cover the complete range.