chart background + remove grid in Android
Posted: Wed Jan 25, 2012 2:26 pm
Hi,
i have two questions regarding chart background (or panel background) and removing the grid background in a line chart.
[*]lest's start with the chart background:
i managed to produce two graphs one is a 3D pie chart and the other is a line chart both of them presented in the images below
i am trying to remove the 3d like surface behind the graphs (they are marked in the pie with an arrow and in the chart with the left arrow)
this is the code i wrote for the pie:
[*]the second question regards the grid of the line chart as presented in the 2nd image (right arrow)
how do i remove it from the graph ?
Thanks!
i have two questions regarding chart background (or panel background) and removing the grid background in a line chart.
[*]lest's start with the chart background:
i managed to produce two graphs one is a 3D pie chart and the other is a line chart both of them presented in the images below
i am trying to remove the 3d like surface behind the graphs (they are marked in the pie with an arrow and in the chart with the left arrow)
this is the code i wrote for the pie:
Code: Select all
mPie = (RelativeLayout)mRootView.findViewById(R.id.status_disk_pie);
chart = new TChart(mRootView.getContext());
chart.getGraphics3D().getAspect().setView3D(true);
chart.getGraphics3D().getAspect().setChart3DPercent(30);
chart.setClickable(true);
chart.addChartMouseListener(new ChartMouseListener()
{
@Override
public void titleClicked(ChartMouseEvent arg0) {
}
@Override
public void legendClicked(ChartMouseEvent arg0) {
}
@Override
public void backgroundClicked(ChartMouseEvent arg0) {
}
@Override
public void axesClicked(ChartMouseEvent arg0) {
}
});
chart.getPanel().setColor(Color.TRANSPARENT); // background
chart.getPanel().setMarginBottom(1);
chart.getPanel().setMarginLeft(0);
chart.getPanel().setMarginRight(1);
chart.getPanel().setMarginTop(5);
chart.getLegend().setVisible(false);
chart.getHeader().setVisible(false);
Series pie = new Pie(chart.getChart());
pie.add(20,Color.green);
pie.add(80,Color.red);
pie.getMarks().setVisible(false); // disabels markers
chart.addSeries(pie);
mPie.addView(chart);
how do i remove it from the graph ?
Thanks!