This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Line chart using org.apache.poi.ss.usermodel.charts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Line chart using org.apache.poi.ss.usermodel.charts" Watch "Line chart using org.apache.poi.ss.usermodel.charts" New topic
Author

Line chart using org.apache.poi.ss.usermodel.charts

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
Hi,
I am running the example given at https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/ScatterChart.java,

it generates line chart with data given


here i came to know how values are coming for x axis but values on Y axis i did not get any clue . can some one try this?
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
here i came to know how values are coming for x axis but values on Y axis i did not get any clue .

What do you mean by that? What were you expecting, and what happened instead? I'd have expected "data.addSerie(xs, ys1)" and "data.addSerie(xs, ys2)" to add line lines to the chart; not so?
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
in the output excel file i am seeing this data

0 1 2 3 4 5 6 7 8 9
0 2 4 6 8 10 12 14 16 18
0 3 6 9 12 15 18 21 24 27

first row becomes your X axis and what about Y axis ? i got that answer
when i tried creating line chart manually in excel it calculates Y Axis values automatically based on data ranges ...

it would be great if come to know purpose of each method method like
what is legend . i went through the documentation but i did not understand that .. and what if i want to add data labels on lines created on chart
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
AFAIK, there is no documentation for the chart parts of POI; javadocs and source code is all there is.

At least they put up some example code at http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/usermodel/examples/ (where your code is from) - very useful!
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
wow great thanks buddy ....this will help me a lot
i got apidocs here

http://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFDrawing.html
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
HI , I copied LineChart examples from the link you provided
i am using POI 3.9 which is not having LineChart.java

which jar is containing these classes
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
LineChart is example code, just like ScatterChart, and not part of POI. You need to compile it like any other code.
ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 234
I did not understand you .

I was getting comilation issue for that example with POI 3.9 jar
i downloaded POI jar 3.10 which resolved my issues .....
BTW here heavy rain is expected ..dark clouds coming up...nice weather to drink Tea and Pakoda ..ummmiiiiess
 
Have you checked out Aspose?
 
subject: Line chart using org.apache.poi.ss.usermodel.charts
 
It's not a secret anymore!