DevExpress之饼状图突出(Explode)设置实例
本文实例讲述了DevExpress之饼状图突出(Explode)设置方法,分享给大家供大家参考。具体实现方法如下:
关键代码如下:
///<summary> ///饼状图突出设置 ///</summary> ///<paramname="chart">ChartControl</param> ///<paramname="pieSeries">Series【仅仅适用于PieSeriesView】</param> ///<paramname="explodeMode">突出模式【枚举】</param> ///<paramname="explodedValue">突出间距</param> ///<paramname="dragPie">是否可以拖动突出饼状</param> publicstaticvoidSetPieExplode(thisChartControlchart,SeriespieSeries,PieExplodeModeexplodeMode,intexplodedValue,booldragPie) { if(pieSeries.ViewisPieSeriesView) { //bool_hitTesting=chart.RuntimeHitTesting; if(!chart.RuntimeHitTesting) chart.RuntimeHitTesting=true;
PieSeriesView_pieView=pieSeries.ViewasPieSeriesView; _pieView.ExplodeMode=explodeMode; _pieView.ExplodedDistancePercentage=explodedValue; _pieView.RuntimeExploding=dragPie;
//chart.RuntimeHitTesting=_hitTesting; } }