We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Candle Chart.

Thread ID:

Created:

Updated:

Platform:

Replies:

121288 Nov 27,2015 02:54 AM Dec 7,2015 06:36 AM ASP.NET MVC 3
loading
Tags: Chart
Andrea Perazzolo
Asked On November 27, 2015 02:54 AM

Hi,
I'd like to know if there is a way to bind the properties of points of the Candle Chart to properties of DataSource.
I have seen in the past that in the Builder there are XName and YName but nothing related to High, Low, Open and Close properties that are in the point.
For that type of chart do I need to add the points manually?

    Thanks in advance

    Andrea Perazzolo

Sanjith Kesavan [Syncfusion]
Replied On November 28, 2015 04:33 AM

Hi Andrea Perazzolo

Thanks for contacting Syncfusion support. We have analyzed your query. It is possible to bind the datasource for the candle chart. Please find the following code example.


In the controller we have created the list and passed that list to the view page using the Viewbag. In the view page we have bound this data to the chart. Please find the below code example


For binding the datasource to the candle chart please use the XName,High, Low, Open and Close builder values. Now the chart will render as per the data we are passing from the controller. Please find the below screenshot.


We have prepared the sample as per your requirement. Please find the sample from below location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/121288/ze/Candle167224762

Please let us know if you have any concern.

Regards,
Sanjith K.

Andrea Perazzolo
Replied On December 1, 2015 08:09 AM

Thanks for the Help.
Just one question.
I have noticed that when I use the DataSource and not the Points HTML Helper in the series, the Marker helper is not defined and gives me Compilation errors.
It works correctly if I use the Points and define all the points.
is it correct?
I am using the 13.3.0.12 version of the controls.

     Thanks in advance

    Andrea Perazzolo

Bharathiraja K [Syncfusion]
Replied On December 7, 2015 06:36 AM

Hi Andrea,


Thanks for your update.


We have analyzed your query (“The Marker helper is not defined and gives me Compilation errors on using data source in the series”) and checked with simple sample using datasource and markers in the series. But we couldn’t reproduce the above reported issue and the sample is working fine. Please find the code snippet.


[CSHTML]

    @(Html.EJ().Chart("chartContainer")

            //...

 

                .Series(sr =>

                {

                    //Adding Candle series

                    sr

                       .Marker(mr => mr

                           .Visible(true)

                           )

                           .XName("XValue")

                           .High("High")

                           .Low("Low")

                           .Open("Open")

                           .Close("Close")

                           .DataSource(ViewBag.datasource)

                           .Type(SeriesType.Candle)

                       .Add();

                })

     )

 

So could you please share your code snippet or sample which will be helpful on resolving the issue and provide you the solution.

 

Let us know if you have any other concerns on this.

 

Thanks,

Bharathiraja.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;