In the constructor of VerticalSymbolicAxis The symbolicValue variable is not initialized which raises a Null exception when autoAdjustRange() method is called. I think the foolwin line should be added in the constructor :
public VerticalSymbolicAxis(String label, String[] sv) {
super(label);
this.symbolicValue = Arrays.asList(sv); // TO ADD
}
I think it has been forgotten since that many lines of code (Constructors' Code ) are commented.
Regards
BUG Report: VerticalSymbolicAxis Class
Re: BUG Report: VerticalSymbolicAxis Class
Another one in same class:
symbolicGridPaint variable not initialized which raises a Null Exception if you call the method setSymbolicGridLinesVisible( true );
Regards
Morpheus
symbolicGridPaint variable not initialized which raises a Null Exception if you call the method setSymbolicGridLinesVisible( true );
Regards
Morpheus
Re: BUG Report: VerticalSymbolicAxis Class
Third one
)
The Symbolic Values are never displayed When using VerticalSymbolicAxis Class because method valueToString( double value ) is never called. To fix this I defined same method in VerticalNumberAxis class :
public String valueToString( double value ) {
String tickLabel;
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
return tickLabel;
}
And replaced in method public void refreshTicks(Graphics2D g2,
Rectangle2D plotArea, Rectangle2D dataArea,
int location) the following sequence with a call to tickLabel = valueToString( currentTickValue );
Sequence to delete in refreshTicks ( From line 519 ):
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
I tested it, it works fine...
Regards
Morpheus

The Symbolic Values are never displayed When using VerticalSymbolicAxis Class because method valueToString( double value ) is never called. To fix this I defined same method in VerticalNumberAxis class :
public String valueToString( double value ) {
String tickLabel;
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
return tickLabel;
}
And replaced in method public void refreshTicks(Graphics2D g2,
Rectangle2D plotArea, Rectangle2D dataArea,
int location) the following sequence with a call to tickLabel = valueToString( currentTickValue );
Sequence to delete in refreshTicks ( From line 519 ):
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
I tested it, it works fine...
Regards
Morpheus
Re: BUG Report: VerticalSymbolicAxis Class
Third one
)
The Symbolic Values are never displayed When using VerticalSymbolicAxis Class because method valueToString( double value ) is never called. To fix this I defined same method in VerticalNumberAxis class :
public String valueToString( double value ) {
String tickLabel;
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
return tickLabel;
}
And replaced in method public void refreshTicks(Graphics2D g2,
Rectangle2D plotArea, Rectangle2D dataArea,
int location) the following sequence with a call to tickLabel = valueToString( currentTickValue );
Sequence to delete in refreshTicks ( From line 519 ):
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
I tested it, it works fine...
Regards
Morpheus

The Symbolic Values are never displayed When using VerticalSymbolicAxis Class because method valueToString( double value ) is never called. To fix this I defined same method in VerticalNumberAxis class :
public String valueToString( double value ) {
String tickLabel;
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
return tickLabel;
}
And replaced in method public void refreshTicks(Graphics2D g2,
Rectangle2D plotArea, Rectangle2D dataArea,
int location) the following sequence with a call to tickLabel = valueToString( currentTickValue );
Sequence to delete in refreshTicks ( From line 519 ):
NumberFormat formatter = getNumberFormatOverride();
if (formatter != null) {
tickLabel = formatter.format(value);
}
else {
tickLabel = getTickUnit().valueToString(value);
}
I tested it, it works fine...
Regards
Morpheus
Re: BUG Report: VerticalSymbolicAxis Class
The first two are already corrected in CVS. I will look at the third...
Regards,
Dave Gilbert
Regards,
Dave Gilbert
Re: BUG Report: VerticalSymbolicAxis Class
Thanks for replying
)
Sincere Respect
Morpheus

Sincere Respect
Morpheus
Re: BUG Report: VerticalSymbolicAxis Class
I'm mapping an interval of values to a symbol label by implementing YisSymbolic interface. Everything is okay except that when rendering on the Range axis the symbol label is not in middle of the interval. Any idea how to overpass this?
Thanks
Morpheus
Thanks
Morpheus
Re: BUG Report: VerticalSymbolicAxis Class
I'm not sure I understand what you mean. Also, be aware that I'm not that knowledgeable about the symbol plots...they were contributed by another developer and I haven't looked that closely at them.
Bug 3 that you reported before is now fixed, it will go into CVS shortly for the 0.9.6 release.
Regards,
Dave Gilbert
Bug 3 that you reported before is now fixed, it will go into CVS shortly for the 0.9.6 release.
Regards,
Dave Gilbert