ArtfulBits Forum
»
Custom Software Development
»
Android OS
»
Pie/Doughnut Chart display problem in Fragments : Only One slice displayed
 Rank: Newbie
Groups: Registered
Joined: 1/11/2012(UTC) Posts: 5
|
Hi,
I still have a problem with your Pie / Doughnut Charts on Android 3.x when putting them in a Fragment.
Only one slice is displayed. When I add the legend, all labels appears and outside labels are well displayed.
After a long time passed to debug, I cannot solve it !
Please help.
Thanks in advance. David
PS: We've already purchase your Developer/Shipping licence
|
|
|
|
 Rank: Member
Groups: Registered
Joined: 7/28/2009(UTC) Posts: 447 
|
Hi,
How many series do you added? What the chart initialization code?
Best regards, |
Volodymyr Baydalka Andriod development and support team |
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 1/11/2012(UTC) Posts: 5
|
I had only one serie on my Pie. Here is my XML : (I removed '<' to avoid errors from your server) Code:
ai:chart xmlns:ai="http://www.artfulbits.com/android/aiCharts">
ai:area />
ai:series
type="Doughnut"
showLabel="true"
border="#585958"
linewidth="1" />
ai:title
dock="Top" />
ai:legend
dock="Right"
align="Far"
background="@android:drawable/alert_dark_frame" />
/ai:chart>
And my JAVA Initialisation code : Code:
ChartSeries mainSerie = aChartView.getSeries().get(0);
mainSerie.getPoints().clear(); // Remove old points (Used when refreshing data on Chart)
mainSerie.getTextPaint().setColor(mContext.getResources().getColor(R.color.budget_graphsTitle_gray));
mainSerie.setAttribute(ChartDoughnutType.LABEL_STYLE, LabelStyle.OutsideColumn);
mainSerie.setAttribute(ChartDoughnutType.OPTIMIZE_POINTS, Boolean.FALSE); // Avoid group of small values
mainSerie.setAttribute(ChartDoughnutType.INNER_RADIUS, new Float(0.3f));
ChartTitle title = aChartView.getTitles().get(0);
title.setText(getTitle(sensOpe, total));
title.getTextPaint().setColor(mContext.getResources().getColor(R.color.budget_graphsTitle_gray));
title.getTextPaint().setFakeBoldText(true);
title.getTextPaint().setTextSize(18);
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 1/11/2012(UTC) Posts: 5
|
Hi,
Do you have any update about this ?
Thanks in advance, David
|
|
|
|
 Rank: Member
Groups: Registered
Joined: 7/28/2009(UTC) Posts: 447 
|
Hi,
How do you add points?
Best regards, |
Volodymyr Baydalka Andriod development and support team |
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 1/11/2012(UTC) Posts: 5
|
I add them using the regular way : Code:
float value = 0f;
int index = 0;
for(GBCategorie aCat : dataRep.keySet()){
value = dataRep.get(aCat).longValue();
ChartPoint point = mainSerie.getPoints().addXY(index, value);
point.setLabel(aCat.getLibelle());
point.setShowLabel(true);
point.setBackColor(Color.parseColor("#"+aCat.getColorCode()));
index++;
}
Where a "GBCategorie" represents a value.
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 1/11/2012(UTC) Posts: 5
|
Hi,
Do you have any update about this ?
Thanks in advance, David
|
|
|
|
 Rank: Member
Groups: Registered
Joined: 7/28/2009(UTC) Posts: 447 
|
Hi, Unfortunately, we can't reproduce that issue. You may send request (provide email that you use to get license) to sales@artfulbits.com to get latest aiChart package. It may help. Best regards, Edited by user Thursday, January 19, 2012 4:55:49 PM(UTC)
| Reason: Not specified |
Volodymyr Baydalka Andriod development and support team |
|
|
|
ArtfulBits Forum
»
Custom Software Development
»
Android OS
»
Pie/Doughnut Chart display problem in Fragments : Only One slice displayed
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.