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