How to use Syncfusion's SfChart with 2015⌶ ?

Using Microsoft Windows Presentation Foundation and Syncfusion WPF Libraries

How to use Syncfusion's SfChart with 2015⌶ ?

Postby PGilbert on Tue Jul 08, 2014 2:28 pm

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.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

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

Postby Dick Bowman on Wed Jul 09, 2014 1:23 pm

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).
Visit http://apl.dickbowman.com to read more from Dick Bowman
User avatar
Dick Bowman
 
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm

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

Postby PGilbert on Wed Jul 09, 2014 3:01 pm

Hello Dick, I would second you for a separate forum for the Syncfusion questions.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

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

Postby Jason|Dyalog on Thu Jul 10, 2014 2:45 pm

We have moved this to the (new) WPF & Syncfusion category.

Jason
Jason|Dyalog
 
Posts: 22
Joined: Tue Sep 09, 2008 2:42 pm

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

Postby JohnD|Dyalog on Thu Aug 14, 2014 2:26 pm

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.
User avatar
JohnD|Dyalog
 
Posts: 62
Joined: Wed Oct 01, 2008 9:35 am

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

Postby PGilbert on Sun Oct 26, 2014 8:24 pm

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
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada


Return to WPF & Syncfusion

Who is online

Users browsing this forum: No registered users and 1 guest