Skip to content

Commit 9946f2f

Browse files
committed
Sync with Kendo UI Professional
1 parent 8074546 commit 9946f2f

File tree

16 files changed

+1142
-271
lines changed

16 files changed

+1142
-271
lines changed

docs-aspnet/html-helpers/charts/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ The Telerik UI for {{ site.framework }} Chart supports an extensive set of serie
330330
| [Pie Charts]({% slug piecharts_aspnetcore_htmlhelper %}) | Pie Charts display data as single-series sectors from a two-dimensional circle which is useful for rendering data as a part of the whole. |
331331
| [Polar Charts]({% slug polarcharts_aspnetcore_htmlhelper %}) | Polar Charts represent the relationships between data points in terms of radiuses and angles in a circular coordinate system. |
332332
| [Donut Charts]({% slug donutcharts_aspnetcore_htmlhelper %}) | Donut Charts are a Pie chart variation with the ability to display data as single-series sectors from a two-dimensional circle. |
333+
| [StockChart]({% slug overview_stockcharthelper_aspnetcore %}) | StockCharts visualize the price movement of any financial instrument over a certain period. |
333334

334335
## Referencing Existing Instances
335336

docs-aspnet/html-helpers/charts/stockchart/data-binding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ page_title: Data Binding
44
description: "Learn how to bind the Telerik UI StockChart component for {{ site.framework }} (MVC 6 or {{ site.framework }} MVC) to data."
55
previous_url: /helpers/charts/stockchart/data-binding
66
slug: databinding_stockchart_aspnetcore
7-
position: 4
7+
position: 2
88
---
99
{% if site.core %}
1010
{% assign DateField = "/api/Kendo.Mvc.UI.Fluent/StockChartBuilder#datefieldsystemstring" %}

docs-aspnet/html-helpers/charts/stockchart/events.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ position: 5
1010

1111
The StockChart exposes a variety of [events](api/kendo.mvc.ui.fluent/stockcharteventbuilder) that you can handle and further customize the behavior of the UI component.
1212

13+
For a complete example on basic Chart events, refer to the [demo on using the events of the Chart](https://demos.telerik.com/{{ site.platform }}/chart-api/events).
14+
1315
## Handling by Handler Name
1416

1517
The following example demonstrates how to subscribe to events by a handler name.
@@ -63,11 +65,12 @@ The following example demonstrates how to subscribe to events by a template dele
6365
## Next Steps
6466

6567
* [Binding the StockChart to Data]({% slug databinding_stockchart_aspnetcore %})
66-
* [Configuring the StockChart Navigator Feature]({% slug navigator_stockchart_aspnetcore %})
67-
68+
* [Creating a Stock History Dashboard (Demo)](https://demos.telerik.com/{{ site.platform }}/financial/stock-history)
6869

6970
## See Also
7071

71-
* [Basic Usage of the StockChart for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/financial/)
7272
* [Client-Side API of the StockChart](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/stock-chart)
73-
* [Server-Side API of the StockChart](/api/stockchart)
73+
* [Server-Side HtmlHelper API of the StockChart](/api/stockchart)
74+
{% if site.core %}
75+
* [Server-Side TagHelper API of the StockChart](/api/taghelpers/stockchart)
76+
{% endif %}

docs-aspnet/html-helpers/charts/stockchart/getting.started.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ slug: stockchart_getting_started
66
position: 1
77
---
88

9+
# Getting Started with the StockChart
10+
911
This tutorial explains how to set up a basic Telerik UI for {{ site.framework }} StockChart and highlights the major steps in the configuration of the component.
1012

1113
After completing this guide, you will achieve the following result:
@@ -329,7 +331,7 @@ To use the client-side API of the StockChart and build on top of its initial con
329331
## Next Steps
330332
331333
* [Binding the StockChart to Data]({% slug databinding_stockchart_aspnetcore %})
332-
* [Configuring the StockChart Navigator Feature]({% slug navigator_stockchart_aspnetcore %})
334+
* [Configuring the StockChart with Multiple Graph Panes]({% slug multiple_panes_stockchart_aspnetcore %})
333335
334336
## See Also
335337
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
---
2+
title: Multiple Panes
3+
page_title: Multiple Panes
4+
description: "Learn how to configure the Telerik UI StockChart component for {{ site.framework }} with multiple panes."
5+
slug: multiple_panes_stockchart_aspnetcore
6+
position: 3
7+
---
8+
9+
# Multiple Panes
10+
11+
The StockChart allows you to create multiple panes with a shared category axis.
12+
13+
Each pane represents a vertical sub-division with an individual value axis. To define multiple panes, apply the following options:
14+
15+
1. Add the desired panes within the `Panes` configuration of the chart:
16+
17+
```HtmlHelper
18+
.Panes(panes =>
19+
{
20+
panes.Add().Title("Value").Background("#ebedeb"); // The main chart pane.
21+
panes.Add("volume").Title("Volume").Height(150); // An additional pane.
22+
})
23+
```
24+
{% if site.core %}
25+
```TagHelper
26+
<panes>
27+
<pane> <!-- The main chart pane.-->
28+
<chart-pane-title text="Value" background="#ebedeb"></chart-pane-title>
29+
</pane>
30+
<pane name="volume" height="150"> <!-- An additional pane.-->
31+
<chart-pane-title text="Volume"></chart-pane-title>
32+
</pane>
33+
</panes>
34+
```
35+
{% endif %}
36+
37+
1. Specify a value axis for each pane. By using the `Pane` option, set the pane name where the respective axis must be rendered.
38+
39+
```HtmlHelper
40+
.ValueAxis(axis => axis.Numeric("valueAxis")) // The value axis that renders in the main pane.
41+
.ValueAxis(axis => axis.Numeric("volumeAxis").Pane("volume")) // The value axis that renders in the "volume" pane.
42+
```
43+
{% if site.core %}
44+
```TagHelper
45+
<value-axis>
46+
<value-axis-item type="numeric" name="valueAxis"></value-axis-item> <!-- The value axis that renders in the main pane. -->
47+
<value-axis-item type="numeric" name="volumeAxis" pane="volume"></value-axis-item> <!-- The value axis that renders in the "volume" pane.-->
48+
</value-axis>
49+
```
50+
{% endif %}
51+
52+
1. Assign the series on a value axis, which is placed in the desired pane.
53+
54+
```HtmlHelper
55+
.Series(series =>
56+
{
57+
series.Candlestick(s => s.Open, s => s.High, s => s.Low, s => s.Close).Axis("valueAxis");
58+
series.Column(s => s.Volume).Axis("volumeAxis");
59+
})
60+
```
61+
{% if site.core %}
62+
```TagHelper
63+
<series>
64+
<series-item type="ChartSeriesType.Candlestick" axis="valueAxis" open-field="Open" high-field="High" low-field="Low" close-field="Close"></series-item>
65+
<series-item type="ChartSeriesType.Column" axis="volumeAxis" field="Volume">
66+
</series-item>
67+
</series>
68+
```
69+
{% endif %}
70+
71+
1. Position the category axis in the desired pane by setting the name of the pane through the `Pane` option.
72+
73+
```HtmlHelper
74+
.CategoryAxis(axis => axis.Pane("volume"))
75+
```
76+
{% if site.core %}
77+
```TagHelper
78+
<category-axis>
79+
<category-axis-item pane="volume"></category-axis-item>
80+
</category-axis>
81+
```
82+
{% endif %}
83+
84+
The following example shows a complete configuration of a StockChart with **Value** and **Volume** panes. The category axis is displayed within the **Volume** pane.
85+
86+
```HtmlHelper
87+
@(Html.Kendo().StockChart<StockDataPoint>()
88+
.Name("stockChart")
89+
.Title("The Boeing Company (NYSE:BA)")
90+
.DataSource(ds => ds.Read(read => read
91+
.Action("_StockData", "Home")
92+
))
93+
.DateField("Date")
94+
.Panes(panes =>
95+
{
96+
panes.Add().Title("Value").Background("#ebedeb");
97+
panes.Add("volume").Title("Volume").Height(150);
98+
})
99+
.CategoryAxis(axis => axis.Pane("volume"))
100+
.ValueAxis(axis => axis.Numeric("valueAxis"))
101+
.ValueAxis(axis => axis.Numeric("volumeAxis").Pane("volume"))
102+
.Series(series =>
103+
{
104+
series.Candlestick(s => s.Open, s => s.High, s => s.Low, s => s.Close).Axis("valueAxis");
105+
series.Column(s => s.Volume).Axis("volumeAxis");
106+
})
107+
)
108+
```
109+
{% if site.core %}
110+
```TagHelper
111+
<kendo-stockchart name="stockChart" date-field="Date">
112+
<chart-title text="The Boeing Company (NYSE:BA)"></chart-title>
113+
<datasource>
114+
<transport>
115+
<read url="@Url.Action("_StockData", "Home")" />
116+
</transport>
117+
<schema>
118+
<model>
119+
<fields>
120+
<field name="Date" type="date"></field>
121+
<field name="Close" type="number"></field>
122+
<field name="Volume" type="number"></field>
123+
<field name="Open" type="number"></field>
124+
<field name="High" type="number"></field>
125+
<field name="Low" type="number"></field>
126+
<field name="Symbol" type="string"></field>
127+
</fields>
128+
</model>
129+
</schema>
130+
</datasource>
131+
<panes>
132+
<pane background="#ebedeb">
133+
<chart-pane-title text="Value" ></chart-pane-title>
134+
</pane>
135+
<pane name="volume" height="150">
136+
<chart-pane-title text="Volume"></chart-pane-title>
137+
</pane>
138+
</panes>
139+
<category-axis>
140+
<category-axis-item pane="volume"></category-axis-item>
141+
</category-axis>
142+
<value-axis>
143+
<value-axis-item type="numeric" name="valueAxis"></value-axis-item>
144+
<value-axis-item type="numeric" name="volumeAxis" pane="volume"></value-axis-item>
145+
</value-axis>
146+
<series>
147+
<series-item type="ChartSeriesType.Candlestick" aixs="valueAxis" open-field="Open" high-field="High" low-field="Low" close-field="Close"></series-item>
148+
<series-item type="ChartSeriesType.Column" axis="volumeAxis" field="Volume">
149+
</series-item>
150+
</series>
151+
</kendo-stockchart>
152+
```
153+
```HomeController
154+
public IActionResult _StockData()
155+
{
156+
using (var db = GetContext())
157+
{
158+
// Return the data as JSON.
159+
return Json(
160+
(from s in db.Stocks
161+
where s.Symbol == "BA"
162+
select new StockDataPoint
163+
{
164+
Date = s.Date,
165+
Open = s.Open,
166+
High = s.High,
167+
Low = s.Low,
168+
Close = s.Close,
169+
Volume = s.Volume
170+
}).ToList()
171+
);
172+
}
173+
}
174+
```
175+
{% else %}
176+
```HomeController
177+
public ActionResult _StockData()
178+
{
179+
using (var db = GetContext())
180+
{
181+
// Return the data as JSON.
182+
return Json(
183+
(from s in db.Stocks
184+
where s.Symbol == "BA"
185+
select new StockDataPoint
186+
{
187+
Date = s.Date,
188+
Open = s.Open,
189+
High = s.High,
190+
Low = s.Low,
191+
Close = s.Close,
192+
Volume = s.Volume
193+
}).ToList(),
194+
JsonRequestBehavior.AllowGet
195+
);
196+
}
197+
}
198+
```
199+
{% endif %}
200+
```Model
201+
public class StockDataPoint
202+
{
203+
public DateTime Date { get; set; }
204+
public decimal Close { get; set; }
205+
public long Volume { get; set; }
206+
public decimal Open { get; set; }
207+
public decimal High { get; set; }
208+
public decimal Low { get; set; }
209+
public string Symbol { get; set; }
210+
}
211+
```
212+
213+
## See Also
214+
215+
* [Configuring Multiple Panes of the StockChart for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/financial/panes)
216+
* [Client-Side API of the StockChart](https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/stock-chart)
217+
* [Server-Side API of the StockChart](/api/stockchart)

docs-aspnet/html-helpers/charts/stockchart/navigator.md

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)