時(shí)間:2023-05-24 07:18:02 | 來源:網(wǎng)站運(yùn)營
時(shí)間:2023-05-24 07:18:02 來源:網(wǎng)站運(yùn)營
.NET商業(yè)圖表庫SciChart開發(fā)實(shí)例:SciChart是一個(gè)用于.NET的商業(yè)圖表庫,用于高性能交互式圖表。雖然他們有移動(dòng)(iOS和Android)庫,但在這里我們將仔細(xì)看看他們的WPF圖表庫。可以在Windows窗體應(yīng)用程序中使用ElementHost或更現(xiàn)代的技術(shù)使用此控件,但它們的核心產(chǎn)品旨在用于WPF應(yīng)用程序。<ext:SciChartInteractionToolbar TargetSurface="{Binding Source={x:Reference Name=sciChart}}"/><!-- Create the chart surface --><s:SciChartSurface x:Name="sciChart" Grid.Column="1"> <!-- Declare RenderableSeries --> <s:SciChartSurface.RenderableSeries> <s:FastLineRenderableSeries x:Name="lineRenderSeries" Stroke="#FF99EE99" StrokeThickness="2"> <s:FastLineRenderableSeries.SeriesAnimation> <s:SweepAnimation AnimationDelay="0:0:1" Duration="0:0:5"/> </s:FastLineRenderableSeries.SeriesAnimation> </s:FastLineRenderableSeries> </s:SciChartSurface.RenderableSeries> <!-- Create an X Axis with GrowBy --> <s:SciChartSurface.XAxis> <s:NumericAxis DrawMajorBands="True" FlipCoordinates="True" GrowBy="0.1, 0.1"/> </s:SciChartSurface.XAxis> <!-- Create a Y Axis with GrowBy. Optional bands give a cool look and feel for minimal performance impact --> <s:SciChartSurface.YAxis> <s:NumericAxis DrawMajorBands="True" GrowBy="0.5, 0.5"/> </s:SciChartSurface.YAxis></s:SciChartSurface>
數(shù)據(jù)必須加載到自定義對(duì)象中才能在圖表中顯示:private void LineChartExampleView_OnLoaded(object sender, RoutedEventArgs e){ // Create a DataSeries of type X=double, Y=double var dataSeries = new XyDataSeries<double, double>(); lineRenderSeries.DataSeries = dataSeries; var data = DataManager.Instance.GetFourierSeries(1.0, 0.1); // Append data to series. SciChart automatically redraws dataSeries.Append(data.XData, data.YData); sciChart.ZoomExtents();}
關(guān)鍵詞:實(shí)例,商業(yè),圖表
客戶&案例
營銷資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。