Hi
I want to set the shape to be triangular. but right now i get the square.
how is it possible to set the shape as we required.For this i have used setItemShape(i,j).but i have no idea about the value of i nd j here.
so plzzzzzzzz help me to solve this problem
Thanx
set the Shape of item
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
You can call setSeriesShape(int, Shape) in the renderer. Make sure the shape is defined with its centre at (0, 0) otherwise it won't align properly to the data point.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


set the Shape of item
Hi
what should i have to passed for the Shape in setSeriesShape(int,Shape) so that i get get Triangle shape rather the square......
Thanx
what should i have to passed for the Shape in setSeriesShape(int,Shape) so that i get get Triangle shape rather the square......
Thanx
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
This is a Java2D question rather than a JFreeChart one, but...why don't you look at the GeneralPath class or the Polygon class in the Java APIs. These classes both implement the Shape interface, and can easily be used to represent a triangle.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

