Wpf/Wp/Silverlight-Chart圖表控件:柱狀圖、餅狀圖等使用匯總


鏈接:http://www.cnblogs.com/jimson/archive/2010/06/21/Wpfchat.html

   http://www.cnblogs.com/mgen/p/3236175.html

   http://www.fengfly.com/plus/view-202939-1.html

   http://www.pin5i.com/showtopic-25016.html

   http://www.cnblogs.com/wJiang/archive/2010/12/14/1905660.html

Chart FX for WPF:

   http://www.evget.com/article/2013/3/11/18613.html

   http://www.evget.com/article/2012/12/24/18330.html

 

思路:1.項目添加dll引用,Xmal添加命名空間引用(dll版本不對可能引發依賴錯誤)

   2.后台准備數據,鍵值對或者對象(2個以上基本類型的屬性)

   3.Xaml端增加Chart控件及數據綁定

 MVVM:

<chart:Chart Grid.Row="1" Grid.Column="1">
    <chart:Chart.Series >
        <chart:ColumnSeries Title="日期" ItemsSource="{Binding ChargeDateSumCollection}" 
                                    IndependentValueBinding="{Binding ChargeDate}" DependentValueBinding="{Binding Account}"/>
    </chart:Chart.Series>
</chart:Chart>



可繪制圖形:

1、LineSeries  線性圖

2、PieSeries  餅圖

3、ColumnSeries  柱形圖

4、AreaSeries  區域圖

5、BarSeries  條狀圖

6、ScatterSeries  散點圖

7、BubbleSeries 氣泡圖

 

組件的常用屬性:

ActualAxes:獲取顯示在該組件上的實際軸數。

Axes:獲取或設置在組件中的軸的序列。

ChartAreaStyle:獲取或設置ISeriesHost的圖表區域樣式。

LegendItems:獲取圖例項的集合。

LegendStyle:獲取或設置圖例的樣式。

LegendTitle:獲取或設置圖例的標題內容。

PlotAreaStyle:獲取或設置該組件繪圖區域的樣式。

Series:獲取或設置顯示在該組件中的數據序列集合。

StylePalette:獲取或設置一個由ISeriesHost子項所使用的樣式調色板。

Title:獲取或設置該組件的標題。

TitleStyle:獲取或設置該組件的標題的樣式。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM