2016-07-06 23 views

答えて

2
  • バインド可能なチャートAPI:DependencyProperties、のObservableCollectionベースのリストやデータ入力。すべてを束縛してください。 XAMLで設定します。競合他社と比較して良好な性能を示しますが、半結合または非結合と同程度に良好ではありません。パフォーマンスの違いは、数百の一連のデータポイントと何百万ものデータポイントを使用している場合に特に顕著です。

    • セミバインド可能なチャートAPI:リストでDependencyProperties、ObservableCollections。データ入力は配列ベースであり、コードビハインドで行う必要があります。したがって、UI設定とチャートオブジェクトをバインドできますが、コード内のデータをフィードするだけです。非常に良いパフォーマンス。

    • バインド不可能なチャートAPI:No DependencyProperties、リストまたはデータ入力にObservableCollectionsがありません。コードビハインドでの通常のプロパティと使用法最高のパフォーマンスとマルチスレッド機能demo applicationが示すように、10億以上のポイントをリアルタイムモニタリングで監視することができます。バインド可能なチャートAPIで

あなたは、チャートを設定して、この

<Window x:Class="BindingExamplePointLineSeries.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:lcub="http://schemas.arction.com/bindablecharting/ultimate/" 
    x:Name="thisTest" 
    Title="MainWindow" Height="350" Width="525"> 
<Grid> 
    <lcub:LightningChartUltimate> 
     <lcub:LightningChartUltimate.ViewXY> 
      <lcub:ViewXY> 
       <lcub:ViewXY.YAxes> 
        <lcub:AxisY/> 
       </lcub:ViewXY.YAxes> 
       <lcub:ViewXY.XAxes> 
        <lcub:AxisX/> 
       </lcub:ViewXY.XAxes> 
       <lcub:ViewXY.PointLineSeries> 
        <lcub:PointLineSeries Points="{Binding ElementName=thisTest, Path = Points}" PointsVisible="True"/> 
       </lcub:ViewXY.PointLineSeries> 
      </lcub:ViewXY> 
     </lcub:LightningChartUltimate.ViewXY> 
    </lcub:LightningChartUltimate> 
</Grid> 

public partial class MainWindow : Window 
{ 
    public MainWindow() 
    { 
     InitializeComponent(); 

     Random rand = new Random(); 
     SeriesPointCollection points0 = new SeriesPointCollection(); 
     for (int i = 0; i < 10; i++) 
     { 
      SeriesPoint p = new SeriesPoint(); 
      p.X = i; 
      p.Y = rand.NextDouble() * 10.0; 
      points0.Add(p); 
     } 
     Points = points0; 
    } 

    public static readonly DependencyProperty PointsProperty = 
     DependencyProperty.Register(
      "Points", 
      typeof(SeriesPointCollection), 
      typeof(MainWindow) 
    ); 

    public SeriesPointCollection Points 
    { 
     get { return GetValue(PointsProperty) as SeriesPointCollection; } 
     set { SetValue(PointsProperty, value as Object); } 
    } 
} 

のように結合し、その後、あなたは束縛あなたのデータをチャート取得することができます。 WPF data binding chart

+0

良い説明相違の表現。私はあなたのスイートにスタンドアロンのバインディングプロジェクトがあることに気付きました。この簡単な例をありがとう。 –

関連する問題