pie.getMarks().setVisible(true);
pie.getMarks().setStyle(MarksStyle.SERIESTITLE);
Consider your code in the adjustCircleMarks() function:
...
rCircleRect.y += tmpH;
rCircleRect.height -= 2 * tmpH;
...
rCircleRect.x += tmpW;
rCircleRect.width -= 2 * tmpW;
On some screens (using Samsung GT-S55701 here), this will produce zero-width pies. I believe the subtraction/multiplication is dangerous.
Circular.adjustCircleMarks buggy for small screens
Re: Circular.adjustCircleMarks buggy for small screens
Hello,
We have an S5570 but I can't reproduce it here. Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
We have an S5570 but I can't reproduce it here. Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Circular.adjustCircleMarks buggy for small screens
I have very limited time on this project, so unfortunately a sample project has to wait.
However, this fixed the issue:
pie.getMarks().setVisible(true);
pie.getMarks().getPen().setVisible(false);
pie.getMarks().getCallout().setLength(0);
pie.getMarks().setStyle(MarksStyle.SERIESTITLE);
Note the call to "setLength". Maybe that can point you in the right direction?
However, this fixed the issue:
pie.getMarks().setVisible(true);
pie.getMarks().getPen().setVisible(false);
pie.getMarks().getCallout().setLength(0);
pie.getMarks().setStyle(MarksStyle.SERIESTITLE);
Note the call to "setLength". Maybe that can point you in the right direction?
Re: Circular.adjustCircleMarks buggy for small screens
Hi,
If the callouts are too long for a chart size, this makes the pie not to be visible because there isn't enough space for it.
However, I've seen there was a problem in Series.java making SERIESTITLE, POINTINDEX or PERCENTRELATIVE MarksStyles to show empty Marks (TJ71016528).
I've just fixed it for the next maintenance release.
If the callouts are too long for a chart size, this makes the pie not to be visible because there isn't enough space for it.
However, I've seen there was a problem in Series.java making SERIESTITLE, POINTINDEX or PERCENTRELATIVE MarksStyles to show empty Marks (TJ71016528).
I've just fixed it for the next maintenance release.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Circular.adjustCircleMarks buggy for small screens
Can you please show the necessary changes so that I can apply it to my source code? My pies keep disappearing
Re: Circular.adjustCircleMarks buggy for small screens
Hmm. One way to produce the error I'm seeing is to disable localization (as described in another thread).
If loading the "CharForHeight" string fails, the returned value will be 69 - a very high value which might produce zero-width pies in the end.
This solved it for my localization hack:
If loading the "CharForHeight" string fails, the returned value will be 69 - a very high value which might produce zero-width pies in the end.
This solved it for my localization hack:
Code: Select all
int tmpW = Utils.round(maxMarkWidth() +
chart.getGraphics3D().textWidth("W"/*Language.getString("CharForHeight")*/) + tmpFrame);
Re: Circular.adjustCircleMarks buggy for small screens
I believe this is a good trade-off:
Code: Select all
if (2 * tmpH >= rCircleRect.height) {
tmpH = rCircleRect.height / 10;
}
Code: Select all
if (2 * tmpW >= rCircleRect.width) {
tmpW = rCircleRect.width / 10;
}
Re: Circular.adjustCircleMarks buggy for small screens
Hi,
Excuse us for the delayed reply here.
Change it for this:
Excuse us for the delayed reply here.
I don't think this will fix the problem you suffer. Anyway, the change at Series.java for TJ71016528 was at the end of the getMarkText function. Where you could read this:znakeeye wrote:Can you please show the necessary changes so that I can apply it to my source code? My pies keep disappearing
Code: Select all
//...
} else if (marks.markerStyle == MarksStyle.XY) {
tmpResult = getAXValue(valueIndex) + tmp + getAYValue(valueIndex);
} else {
tmpResult = "";
}
return customMarkText.getMarkText(valueIndex, tmpResult);
}
Code: Select all
//...
} else if (marks.markerStyle == MarksStyle.XY) {
tmpResult = getAXValue(valueIndex) + tmp + getAYValue(valueIndex);
} else if (marks.markerStyle == MarksStyle.SERIESTITLE) {
tmpResult = this.toString();
} else if (marks.markerStyle == MarksStyle.POINTINDEX) {
tmpResult = String.valueOf(valueIndex);
} else if (marks.markerStyle == MarksStyle.PERCENTRELATIVE) {
double pval = (valueIndex == 0) ? 1.0 : getMarkValue(valueIndex) / getMarkValue(0);
tmpResult = percentDecimal.format(pval*100);
} else {
tmpResult = "";
}
return customMarkText.getMarkText(valueIndex, tmpResult);
}
Correct me if I didn't understood it correctly. You disabled the localization as said here, this makes the application crash when it tries to do some calculations with the labels and the code above is a workaround for this. Am I correct?znakeeye wrote:Hmm. One way to produce the error I'm seeing is to disable localization (as described in another thread).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |