use of org.xclcharts.chart.PieData in project XCL-Charts by xcltapestry.
the class PlotLegendRender method convertArrayPieKey.
private void convertArrayPieKey(List<PieData> dataSet) {
if (null == dataSet)
return;
String key = "";
for (PieData cData : dataSet) {
key = cData.getKey();
if (!isDrawKey(key))
continue;
if ("" == key)
continue;
mLstKey.add(key);
mLstColor.add(cData.getSliceColor());
PlotDot dot = new PlotDot();
dot.setDotStyle(XEnum.DotStyle.RECT);
mLstDotStyle.add(dot);
}
}
use of org.xclcharts.chart.PieData in project XCL-Charts by xcltapestry.
the class MultiAxisChart03View method chartDataSetPie.
private void chartDataSetPie() {
/*
chartDataPie.add(new PieData("closed","25%" , (0.25*100),(int)Color.rgb(155, 187, 90)));
chartDataPie.add(new PieData("inspect","45%" , (0.45*100),(int)Color.rgb(191, 79, 75)));
chartDataPie.add(new PieData("workdone","15%" , (0.15*100),(int)Color.rgb(60, 173, 213)));
chartDataPie.add(new PieData("dispute","15%" , (0.15*100),(int)Color.rgb(90, 79, 88)));
*/
chartDataPie.add(new PieData("closed", "25%", 25, Color.rgb(155, 187, 90)));
chartDataPie.add(new PieData("inspect", "45%", 45, Color.rgb(191, 79, 75)));
chartDataPie.add(new PieData("workdone", "15%", 15, Color.rgb(60, 173, 213)));
chartDataPie.add(new PieData("dispute", "15%", 15, Color.rgb(90, 79, 88)));
}
use of org.xclcharts.chart.PieData in project XCL-Charts by xcltapestry.
the class PieChart3D01View method triggerClick.
// 触发监听
private void triggerClick(float x, float y) {
ArcPosition record = chart.getPositionRecord(x, y);
if (null == record)
return;
PieData pData = chartData.get(record.getDataID());
Toast.makeText(this.getContext(), " key:" + pData.getKey() + " Label:" + pData.getLabel(), Toast.LENGTH_SHORT).show();
/*
//在点击处显示tooltip
mPaintToolTip.setColor(Color.RED);
chart.getToolTip().setCurrentXY(x,y);
chart.getToolTip().addToolTip(" key:" + pData.getKey() +
" Label:" + pData.getLabel(),mPaintToolTip);
this.invalidate();*/
}
use of org.xclcharts.chart.PieData in project XCL-Charts by xcltapestry.
the class RadarChart03View method chartDataSet3.
private void chartDataSet3() {
// 设置图表数据源
// PieData(标签,百分比,在饼图中对应的颜色)
// (int)Color.rgb(39, 51, 72)));
roseData.add(new PieData("", 40, Color.rgb(149, 206, 255)));
// (int)Color.rgb(39, 51, 72)));
roseData.add(new PieData("", 50, Color.rgb(149, 206, 255)));
// (int)Color.rgb(39, 51, 72)));
roseData.add(new PieData("", 60, Color.rgb(149, 206, 255)));
// (int)Color.rgb(77, 83, 97) ));
roseData.add(new PieData("", 70, Color.rgb(149, 206, 255)));
// (int)Color.rgb(148, 159, 181)));
roseData.add(new PieData("", 80, Color.rgb(149, 206, 255)));
// (int)Color.rgb(253, 180, 90)));
roseData.add(new PieData("", 90, Color.rgb(149, 206, 255)));
// (int)Color.rgb(52, 194, 188)));
roseData.add(new PieData("", 95, Color.rgb(149, 206, 255)));
// (int)Color.rgb(39, 51, 72)));
roseData.add(new PieData("", 97, Color.rgb(149, 206, 255)));
}
use of org.xclcharts.chart.PieData in project XCL-Charts by xcltapestry.
the class RadarChart03View method chartDataSet2.
private void chartDataSet2() {
// 设置图表数据源
// PieData(标签,百分比,在饼图中对应的颜色)
/*
roseData3.add(new PieData("看",40,(int)Color.rgb(31, 59, 123) ));
roseData3.add(new PieData("图" ,50,(int)Color.rgb(173, 214, 224)));
roseData3.add(new PieData("的" ,60,(int)Color.rgb(233, 77, 67)));
roseData3.add(new PieData("那" ,45,(int)Color.rgb(191, 225, 84)));
roseData3.add(new PieData("个",70,(int)Color.rgb(0, 156, 214)));
*/
roseData3.add(new PieData("A1", 10, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A2", 20, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A3", 30, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A4", 40, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A5", 50, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A6", 60, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A7", 70, Color.rgb(92, 92, 97)));
roseData3.add(new PieData("A8", 80, Color.rgb(92, 92, 97)));
}
Aggregations