原創|使用教程|編輯:郝浩|2013-02-27 17:12:34.000|閱讀 782 次
概述:Win/Loss 圖表可以用來記錄win/loss/tie記錄,現在也越來越多的應用在儀表方面顯示值的集合,在本次的文章中,在Chart FX for WPF中創建Win/Loss 圖表。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Win/Loss 圖表可以用來記錄win/loss/tie記錄,現在也越來越多的應用在儀表方面顯示值的集合,在本次的文章中,在Chart FX for WPF中創建Win/Loss 圖表。
<cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.GalleryAttributes> <cfxwinloss:WinLoss Goal="30" LossFill="#FF8B89" LossStroke="#FF8B89" WinFill="#909090" WinStroke="#909090"/> </cfx:AllSeriesAttributes.GalleryAttributes> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> <cfx:Chart.ConditionalAttributes> <cfx:ConditionalAttributes Fill="#007010" Stroke="#007010"> <cfx:ConditionalAttributes.Condition> <cfxData:AndCondition> <cfx:RangeCondition From="30"/> <cfxData:MaximumValueCondition/> </cfxData:AndCondition> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> <cfx:ConditionalAttributes Fill="Red" Stroke="Red"> <cfx:ConditionalAttributes.Condition> <cfxData:AndCondition> <cfx:RangeCondition To="30"/> <cfxData:MinimumValueCondition/> </cfxData:AndCondition> </cfx:ConditionalAttributes.Condition> </cfx:ConditionalAttributes> </cfx:Chart.ConditionalAttributes>
最后,將會使用WinLoss顯示一個新的功能,當圖表的尺寸、點數量、或是兩者結合產生的條形時,這個功能在條形圖中非常的有用,問題是使用doubles計算尺寸和位置。這將會使得WPF 縮放和的獨立的像素像預期的一樣工作,但是可能會產生一個問題,在條間的距離不變。比如說,如果現在切換到24點每個產品,設置圖表的尺寸為120像素,就 會出現以下的情況:
在PlotArea中有個新的屬性叫做PixelSnapMethod現在支持三種值:
None:默認值,對于所有的操作都使用double
Full:確定條的尺寸以及條形之間的距離是固定的,注意這也可能會在圖表側面生成白色區域
Marker:固定條形之間的區域,但是標記可能會有所不同
<cfx:Chart.PlotArea> <cfx:PlotAreaAttributes Margin="0" AxesStyle="None" Background="{x:Null}" Stroke="{x:Null}" PixelSnapMethod="Full"/> </cfx:Chart.PlotArea>
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件