Line Chart


Show a simple line chart.



XAML


xaml←LineChartXAML
⍝ XAML for the LineChart example
 xaml←⊂'<Window'
 xaml,←⊂'    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"'
 xaml,←⊂'    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"'
 xaml,←⊂'    xmlns:sfchart="clr-namespace:Syncfusion.Windows.Chart;assembly=SyncFusion.Chart.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight" >'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sfchart:Chart Name="sfline" Height="200" Width="200">'
 xaml,←⊂'          <sfchart:ChartArea>'
 xaml,←⊂'            <sfchart:ChartSeries Name="seriesline" Type="Line" />'
 xaml,←⊂'          </sfchart:ChartArea>'
 xaml,←⊂'        </sfchart:Chart>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>'


Code


∇  z←LineChart(header values);⎕IO;⎕ML;xaml;⎕USING;pievalues;vl;al;series;chartdata;point
⍝ Simple LineChart example
 ⎕IO ⎕ML←0 3
 xaml←LineChartXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncChart')
 window_line window_series←{#.window.FindName⊂⍵}¨'sfline' 'seriesline'
 ⎕USING←,⊂'Syncfusion.Windows.Chart,Syncfusion/4.5/Syncfusion.Chart.WPF.dll'
 window_line.Header←header
 chartdata←⎕NEW ChartListData
 :For point :In values
     chartdata.Add ⎕NEW ChartPoint point
 :EndFor
 window_series.Data←chartdata
 {}#.window.ShowDialog


The 'SyncChart' argument to #.UTIL.LoadXAML has the effect of adding
  'Syncfusion.Windows.Chart,Syncfusion/4.5/Syncfusion.Chart.WPF.dll'
 to the ⎕USING list of LoadXAML

Operation


     #.LineChart.LineChart'Wiggly wiggly'((⍳20),¨+\?⍳20)

Unresolved Issues