diff --git a/ej2-asp-core-mvc/chart/EJ2_ASP.MVC/working-with-data.md b/ej2-asp-core-mvc/chart/EJ2_ASP.MVC/working-with-data.md index 3aec96d671..8ec6c570fb 100644 --- a/ej2-asp-core-mvc/chart/EJ2_ASP.MVC/working-with-data.md +++ b/ej2-asp-core-mvc/chart/EJ2_ASP.MVC/working-with-data.md @@ -1,9 +1,9 @@ --- layout: post -title: Working With Data in ##Platform_Name## Chart Component -description: Learn here all about Working With Data in Syncfusion ##Platform_Name## Chart component of Syncfusion Essential JS 2 and more. +title: Working with data in ##Platform_Name## Syncfusion Chart Component +description: Learn here all about Working with data in Syncfusion ##Platform_Name## Chart component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc -control: Working With Data +control: Working with data publishingplatform: ##Platform_Name## documentation: ug --- @@ -11,13 +11,13 @@ documentation: ug -# Working with Data +# Working with data in ##Platform_Name## Chart Component -Chart can visualise data bound from local or remote data. +Chart can visualize data bound from local or remote data. -## Local Data +## Local data -You can bind a simple JSON data to the chart using [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series. Now map the fields in JSON to [`XName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`YName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. +You can bind a simple JSON data to the chart using [`DataSource`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series. Now map the fields in JSON to [`XName`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`YName`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. {% if page.publishingplatform == "aspnet-core" %} @@ -44,9 +44,9 @@ You can bind a simple JSON data to the chart using [`DataSource`](https://help.s -### Common Datasource +### Common datasource -You can also bind a JSON data common to all series using [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in chart. +You can also bind a JSON data common to all series using [`DataSource`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in chart. {% if page.publishingplatform == "aspnet-core" %} @@ -73,9 +73,9 @@ You can also bind a JSON data common to all series using [`DataSource`](https:// -## Remote Data +## Remote data -You can also bind remote data to the chart using `DataManager`. The DataManager requires minimal information like webservice URL, adaptor and crossDomain to interact with service endpoint properly. Assign the instance of DataManager to the [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series and map the fields of data to [`XName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`YName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. You can also use the [`Query`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_Query) property of the series to filter the data. +You can also bind remote data to the chart using `DataManager`. The DataManager requires minimal information like webservice URL, adaptor and crossDomain to interact with service endpoint properly. Assign the instance of DataManager to the [`DataSource`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series and map the fields of data to [`XName`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`YName`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. You can also use the [`Query`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_Query) property of the series to filter the data. {% if page.publishingplatform == "aspnet-core" %} @@ -102,6 +102,162 @@ You can also bind remote data to the chart using `DataManager`. The DataManager +## Binding data using ODataAdaptor + +[`OData`](http://www.odata.org/documentation/odata-version-3-0/) is a standardized protocol for creating and consuming data. You can retrieve data from an OData service using the DataManager. Refer to the following code example for remote data binding using an OData service. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Odata-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Odata-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Binding data using ODataV4Adaptor + +ODataV4 is an improved version of the OData protocols, and the `DataManager` can also retrieve and consume ODataV4 services. For more details on ODataV4 services, refer to the [`odata documentation`](http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_Toc453752197). To bind an ODataV4 service, use the **ODataV4Adaptor**. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Odatav4-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Odatav4-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Web API adaptor + +You can use the **WebApiAdaptor** to bind the chart with a Web API created using an OData endpoint. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Web-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Web-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + +The response object should contain the properties **Items** and **Count**, where **Items** represents a collection of entities, and **Count** represents the total number of entities. + +The sample response object should appear as follows: + +``` +{ + Items: [{..}, {..}, {..}, ...], + Count: 830 +} +``` + + + +## Custom adaptor + +You can create your own adaptor by extending the built-in adaptors. The following demonstrates the custom adaptor approach and how to add a serial number to the records by overriding the built-in response processing using the **processResponse** method of the **ODataAdaptor**. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Custom-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Custom-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Offline mode + +When using remote data binding, all chart actions will be processed on the server-side. To avoid postback for every action, configure the chart to load all data upon initialization and handle actions on the client-side. To enable this behavior, utilize the **offline** property of the `DataManager`. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/offline-mode/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Offline-mode.cs" %} +{% include code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/offline-mode/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Offline-mode.cs" %} +{% include code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + ## Empty points The Data points that uses the `null` or `undefined` as value are considered as empty points. Empty data points are ignored and not plotted in the Chart. When the data is provided by using the points property, By using `EmptyPointSettings` property in series, you can customize the empty point. Default `Mode` of the empty point is `Gap`. @@ -186,3 +342,4 @@ Specific color for empty point can be set by `Fill` property in `EmptyPointSetti {% endtabs %} {% endif %} + diff --git a/ej2-asp-core-mvc/chart/EJ2_ASP.NETCORE/working-with-data.md b/ej2-asp-core-mvc/chart/EJ2_ASP.NETCORE/working-with-data.md index 40d71b78aa..ed44fb6601 100644 --- a/ej2-asp-core-mvc/chart/EJ2_ASP.NETCORE/working-with-data.md +++ b/ej2-asp-core-mvc/chart/EJ2_ASP.NETCORE/working-with-data.md @@ -1,9 +1,9 @@ --- layout: post -title: Working With Data in ##Platform_Name## Chart Component -description: Learn here all about working with data in Syncfusion ##Platform_Name## Chart component of Syncfusion Essential JS 2 and more. +title: Working with data in ##Platform_Name## Syncfusion Chart Component +description: Learn here all about Working with data in Syncfusion ##Platform_Name## Chart component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc -control: Working With Data +control: Working with data publishingplatform: ##Platform_Name## documentation: ug --- @@ -11,11 +11,11 @@ documentation: ug -# Working with Data +# Working with data in ##Platform_Name## Chart Component -Chart can visualise data bound from local or remote data. +Chart can visualize data bound from local or remote data. -## Local Data +## Local data You can bind a simple JSON data to the chart using [`dataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series. Now, map the fields in JSON to [`xName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`yName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. @@ -44,7 +44,7 @@ You can bind a simple JSON data to the chart using [`dataSource`](https://help.s -### Common Datasource +### Common datasource You can also bind a JSON data common to all series using [`dataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in chart. @@ -73,7 +73,7 @@ You can also bind a JSON data common to all series using [`dataSource`](https:// -## Remote Data +## Remote data You can also bind remote data to the chart using `DataManager`. The DataManager requires minimal information like webservice URL, adaptor and crossDomain to interact with service endpoint properly. Assign the instance of DataManager to the [`dataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_DataSource) property in series and map the fields of data to [`xName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_XName) and [`yName`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_YName) properties. You can also use the [`query`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Charts.ChartSeries.html#Syncfusion_EJ2_Charts_ChartSeries_Query) property of the series to filter the data. @@ -102,6 +102,162 @@ You can also bind remote data to the chart using `DataManager`. The DataManager +## Binding data using ODataAdaptor + +[`OData`](http://www.odata.org/documentation/odata-version-3-0/) is a standardized protocol for creating and consuming data. You can retrieve data from an OData service using the DataManager. Refer to the following code example for remote data binding using an OData service. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Odata-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Odata-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Binding data using ODataV4Adaptor + +ODataV4 is an improved version of the OData protocols, and the `DataManager` can also retrieve and consume ODataV4 services. For more details on ODataV4 services, refer to the [`odata documentation`](http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_Toc453752197). To bind an ODataV4 service, use the **ODataV4Adaptor**. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Odatav4-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Odatav4-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Web API adaptor + +You can use the **WebApiAdaptor** to bind the chart with a Web API created using an OData endpoint. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Web-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Web-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + +The response object should contain the properties **Items** and **Count**, where **Items** represents a collection of entities, and **Count** represents the total number of entities. + +The sample response object should appear as follows: + +``` +{ + Items: [{..}, {..}, {..}, ...], + Count: 830 +} +``` + + + +## Custom adaptor + +You can create your own adaptor by extending the built-in adaptors. The following demonstrates the custom adaptor approach and how to add a serial number to the records by overriding the built-in response processing using the **processResponse** method of the **ODataAdaptor**. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Custom-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Custom-adaptor.cs" %} +{% include code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + +## Offline mode + +When using remote data binding, all chart actions will be processed on the server-side. To avoid postback for every action, configure the chart to load all data upon initialization and handle actions on the client-side. To enable this behavior, utilize the **offline** property of the `DataManager`. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/offline-mode/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Offline-mode.cs" %} +{% include code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/chart/axis/working-data/offline-mode/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Offline-mode.cs" %} +{% include code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + + + ## Empty points The Data points that uses the `null` or `undefined` as value are considered as empty points. Empty data points are ignored and not plotted in the Chart. When the data is provided by using the points property, by using `emptyPointSettings` property in series, you can customize the empty point. Default `mode` of the empty point is `Gap`. diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs new file mode 100644 index 0000000000..2d555a9aad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/custom-adaptor.cs @@ -0,0 +1,4 @@ +public ActionResult Index() +{ + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/razor b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/razor new file mode 100644 index 0000000000..beeeb05fdc --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/razor @@ -0,0 +1,28 @@ +@Html.EJS().Chart("container").Series(series => + { + series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Column). + XName("CustomerID"). + YName("Sno"). + DataSource("dataManager"). + Query("query"). + Add(); + }).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category) + ).Title("Order Details").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/tagHelper b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/tagHelper new file mode 100644 index 0000000000..215e76be76 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/custom-adaptor/tagHelper @@ -0,0 +1,28 @@ + + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs new file mode 100644 index 0000000000..2d555a9aad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/odata-adaptor.cs @@ -0,0 +1,4 @@ +public ActionResult Index() +{ + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/razor b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/razor new file mode 100644 index 0000000000..e8c8ca4ded --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/razor @@ -0,0 +1,19 @@ +@Html.EJS().Chart("container").Series(series => + { + series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Column). + XName("CustomerID"). + YName("Freight"). + DataSource("dataManager"). + Query("query"). + Add(); + }).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category) + ).Title("Order Details").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/tagHelper b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/tagHelper new file mode 100644 index 0000000000..a51072fb80 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odata-adaptor/tagHelper @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs new file mode 100644 index 0000000000..2d555a9aad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/odatav4-adaptor.cs @@ -0,0 +1,4 @@ +public ActionResult Index() +{ + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/razor b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/razor new file mode 100644 index 0000000000..434e18f8bd --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/razor @@ -0,0 +1,18 @@ +@Html.EJS().Chart("container").Series(series => + { + series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Column). + XName("CustomerID"). + YName("Freight"). + DataSource("dataManager"). + Query("query"). + Add(); + }).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category) + ).Title("Order Details").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/tagHelper b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/tagHelper new file mode 100644 index 0000000000..2c3e1fc894 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/odatav4-adaptor/tagHelper @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs new file mode 100644 index 0000000000..2d555a9aad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/offline-mode.cs @@ -0,0 +1,4 @@ +public ActionResult Index() +{ + return View(); +} \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/razor b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/razor new file mode 100644 index 0000000000..b1a9cfd3e5 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/razor @@ -0,0 +1,19 @@ +@Html.EJS().Chart("container").Series(series => + { + series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Column). + XName("CustomerID"). + YName("Freight"). + DataSource("dataManager"). + Query("query"). + Add(); + }).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category) + ).Title("Order Details").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/tagHelper b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/tagHelper new file mode 100644 index 0000000000..229532c1d1 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/offline-mode/tagHelper @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/razor b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/razor new file mode 100644 index 0000000000..0bbf915f57 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/razor @@ -0,0 +1,18 @@ +@Html.EJS().Chart("container").Series(series => + { + series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Column). + XName("CustomerID"). + YName("Freight"). + DataSource("dataManager"). + Query("query"). + Add(); + }).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category) + ).Title("Order Details").Render() + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/tagHelper b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/tagHelper new file mode 100644 index 0000000000..0e53279da2 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/tagHelper @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs new file mode 100644 index 0000000000..2d555a9aad --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/chart/axis/working-data/web-adaptor/web-adaptor.cs @@ -0,0 +1,4 @@ +public ActionResult Index() +{ + return View(); +} \ No newline at end of file