Skip to content

Commit 3e83b1f

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent d68a9cd commit 3e83b1f

File tree

3 files changed

+677
-0
lines changed

3 files changed

+677
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Panes
3+
page_title: Panes
4+
description: "Learn how to configure the panes of a Telerik UI Chart HtmlHelper for {{ site.framework }}."
5+
slug: htmlhelpers_charts_panes_aspnetcore
6+
---
7+
8+
# Panes
9+
10+
The Chart panes enable you to create vertical sub-divisions in a single categorical Chart.
11+
12+
You have to set an individual value axis to each pane. Multiple panes can share a category axis.
13+
14+
> Only the Categorical Chart series - Area, Bar, Box Plot, Bullet, Line, Radar, Range Area, Range Bar and Waterfall support the configuration of panes.
15+
16+
Panes are declared through the `Panes` configuration. To control the series placement, plot the series on a value axis, which is placed in the desired pane.
17+
18+
## Default Settings
19+
20+
Settings that apply to all panes can be declared through the `PaneDefaults` configuration.
21+
22+
The following example sets the default background color for the panes:
23+
24+
@(Html.Kendo().Chart()
25+
.Name("chart")
26+
.PaneDefaults(p=> p.Background("#00ff00"))
27+
.Title("Site Visitors Stats \n /thousands/")
28+
.Legend(legend => legend
29+
.Visible(false)
30+
)
31+
.ChartArea(chartArea => chartArea
32+
.Background("transparent")
33+
)
34+
.Series(series =>
35+
{
36+
series.Bar(new double[] { 56000, 63000, 74000, 91000, 117000, 138000 }).Name("Total Visits");
37+
series.Bar(new double[] { 52000, 34000, 23000, 48000, 67000, 83000 }).Name("Unique visitors");
38+
})
39+
.CategoryAxis(axis => axis
40+
.Categories("Jan", "Feb", "Mar", "Apr", "May", "Jun")
41+
.MajorGridLines(lines => lines.Visible(false))
42+
)
43+
.ValueAxis(axis => axis
44+
.Numeric()
45+
.Max(140000)
46+
.Line(line => line.Visible(false))
47+
.MajorGridLines(lines => lines.Visible(true))
48+
)
49+
.Tooltip(tooltip => tooltip
50+
.Visible(true)
51+
.Template("#= series.name #: #= value #")
52+
)
53+
)
54+
55+
## Disable Clipping
56+
57+
By default, the pane content cannot extend beyond its border. This prevents charts from overlapping other elements like the legend or title.
58+
59+
Pane clipping may be undesired, for example when plotting series markers at the edge of the pane.
60+
To disable clipping, set the `Panes.Clip` setting to `false`:
61+
62+
@(Html.Kendo().Chart()
63+
.Name("chart")
64+
.Panes(p => p.Add().Clip(false))
65+
.Title("Site Visitors Stats \n /thousands/")
66+
.Legend(legend => legend
67+
.Visible(false)
68+
)
69+
.ChartArea(chartArea => chartArea
70+
.Background("transparent")
71+
)
72+
.Series(series =>
73+
{
74+
series.Bar(new double[] { 56000, 63000, 74000, 91000, 117000, 138000 }).Name("Total Visits");
75+
series.Bar(new double[] { 52000, 34000, 23000, 48000, 67000, 83000 }).Name("Unique visitors");
76+
})
77+
.CategoryAxis(axis => axis
78+
.Categories("Jan", "Feb", "Mar", "Apr", "May", "Jun")
79+
.MajorGridLines(lines => lines.Visible(false))
80+
)
81+
.ValueAxis(axis => axis
82+
.Numeric()
83+
.Max(140000)
84+
.Line(line => line.Visible(false))
85+
.MajorGridLines(lines => lines.Visible(true))
86+
)
87+
.Tooltip(tooltip => tooltip
88+
.Visible(true)
89+
.Template("#= series.name #: #= value #")
90+
)
91+
)
92+
93+
## See Also
94+
95+
* [Using the API of the Chart HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/chart-api/index)
96+
* [Basic Usage of the Area Chart HtmlHelper for {{ site.framework }} (Demos)](https://demos.telerik.com/{{ site.platform }}/area-charts/index)
97+
* [Server-Side API](/api/chart)

0 commit comments

Comments
 (0)