Page 1 of 1

How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Tue Jul 08, 2014 2:28 pm
by PGilbert
Hello, I would like to use 2015⌶ to populate a FastLineSeries of a SfChart from Syncfusion. This is the code that I use:

      sfChartBindDemo

sfDir←'Syncfusion/4.5/' ⍝ Location of the Syncfusion dll's
⎕USING←'Syncfusion.UI.Xaml.Charts,',sfDir,'Syncfusion.SfChart.WPF.dll'
⎕USING,←'System.Windows,WPF/PresentationFramework.dll' 'System'


sfChart←⎕NEW SfChart

sfChart.PrimaryAxis←⎕NEW NumericalAxis
sfChart.PrimaryAxis.(Minimum Maximum)←0 10

sfChart.SecondaryAxis←⎕NEW NumericalAxis
sfChart.SecondaryAxis.(Minimum Maximum)←0 10

fastLineSeries←⎕NEW FastLineSeries
fastLineSeries.XBindingPath←⊂'C1'
fastLineSeries.YBindingPath←⊂'C2'
fastLineSeries.StrokeThickness←2

mat←(⍳10),[1.5]2+0.5×⍳10
⎕EX'ns'
ns←⎕NS¨10⍴⊂''
ns.C1←mat[;1]
ns.C2←mat[;2]
options←2 2⍴'C1'Int32'C2'Int32
fastLineSeries.ItemsSource←options(2015⌶)'ns'
sfChart.Series.Add fastLineSeries

win←⎕NEW Window
win.Content←sfChart
win.Show


However I am getting a DOMAIN ERROR when trying to set the binding with 2015⌶. What is it that I am doing wrong ?

Thanks in advance.

Re: How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Wed Jul 09, 2014 1:23 pm
by Dick Bowman
Can't help, but your message reminds me that I have an unresolved issue with Sparkline (gets the right number of data points, but shows all as zero values).

I'm wondering whether we should have a new Forum section just for SyncFusion (whose own documentation seems sometimes to be patchy).

Re: How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Wed Jul 09, 2014 3:01 pm
by PGilbert
Hello Dick, I would second you for a separate forum for the Syncfusion questions.

Re: How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Thu Jul 10, 2014 2:45 pm
by Jason|Dyalog
We have moved this to the (new) WPF & Syncfusion category.

Jason

Re: How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Thu Aug 14, 2014 2:26 pm
by JohnD|Dyalog
Hi Pierre,

This is a gap in our implementation, and hopefully it'll get addressed soon. The problem is that we don't allow the matrix left argument when the variable to be bound is a vector of namespaces. A matrix is only allowed for a scalar namespace.

We'll get a fix out for this soon.

Best Regards,
John Daintree.

Re: How to use Syncfusion's SfChart with 2015⌶ ?

Posted: Sun Oct 26, 2014 8:24 pm
by PGilbert
Hi John, with the latest fix, the example is working now. Thanks.

I am able to replace the following lines:

Code: Select all

ns←⎕NS¨10⍴⊂''
 ns.C1←mat[;1]
 ns.C2←mat[;2]


with:

Code: Select all

 ns←∆MatToNs mat


where ∆MatToNs is defined as:

Code: Select all

 ∆MatToNs←{ns←⎕NS¨(1⌷⍴⍵)⍴⊂''
     ⍎'ns.(',(∊' C'∘,¨⍕¨⍳2⌷⍴⍵),')←¨↓⍵ ⋄ ns'}


If there is a better way at doing this please let me know.

Regards,

Pierre Gilbert