How to set the size of shape?
How to set the size of shape?
How to set or get the size of shape in StandardXYItemRenderer?
Re: How to set the size of shape?
Hello,
There were some dedicated methods in the version 0.9.4, including the setDefaultShapeScale(double scale) of the StandardXYItemRenderer class.
The method has disapeared in version 0.9.6 and the related code has been put in comments. I did not had time for looking further on that subject, but I guess David had some good reasons for that. He will certainly give us some more info to know :
- if it there were some bugs he did not had time to fix
- if he thought the methods were not used
- if he had plan to rewrite these functionality in an other way... but had not the time for that
Regards,
Arnaud
There were some dedicated methods in the version 0.9.4, including the setDefaultShapeScale(double scale) of the StandardXYItemRenderer class.
The method has disapeared in version 0.9.6 and the related code has been put in comments. I did not had time for looking further on that subject, but I guess David had some good reasons for that. He will certainly give us some more info to know :
- if it there were some bugs he did not had time to fix
- if he thought the methods were not used
- if he had plan to rewrite these functionality in an other way... but had not the time for that
Regards,
Arnaud
Re: How to set the size of shape?
The scaling is gone, it just happened as I was recoding everything to support dual axes/datasets/renderers. It can probably be put back in fairly easily.
There is a setShape(...) method in the AbstractRenderer class that allows you to set the Shape that will be used for a series. You specify the dataset index (0 for primary dataset, 1 for secondary dataset), the series index and the shape. The shape can be any instance of Shape, but you should make sure that (0,0) is roughly in the middle of the shape (because the code translates the shape to (x, y))...the other dimensions don't matter.
Regards,
DG
There is a setShape(...) method in the AbstractRenderer class that allows you to set the Shape that will be used for a series. You specify the dataset index (0 for primary dataset, 1 for secondary dataset), the series index and the shape. The shape can be any instance of Shape, but you should make sure that (0,0) is roughly in the middle of the shape (because the code translates the shape to (x, y))...the other dimensions don't matter.
Regards,
DG