In need a chart that has a shaded area between a max and min set of curves, indicating the allowable area
Like this one: https://demos.telerik.com/kendo-ui/range-area-charts/index
Like in Kendo (here and here) so I can change the cursor for the chart to a pointer when the user hovers the series - I want that to indicate they can click on it (through the SeriesClick event).
---
ADMIN EDIT
workaround that you can consider which uses CSS to traverse the chart rendering:
<style>
/* this will work in the chart below with its settings, axes, title and so on */
.k-chart g[clip-path] g g g path {
cursor: pointer;
}
/* a very generic selector that will capture just about everything in the plot area of the chart */
/* Try this if you cannot make a more specific selector like the one above by inspecting the rendered content */
/*.k-chart path {
cursor: pointer;
}*/
</style>
<TelerikChart>
<ChartSeriesItems>
<ChartSeries Type="ChartSeriesType.Column" Name="Product 1" Data="@series1Data">
</ChartSeries>
<ChartSeries Type="ChartSeriesType.Column" Name="Product 2" Data="@series2Data">
</ChartSeries>
</ChartSeriesItems>
<ChartCategoryAxes>
<ChartCategoryAxis Categories="@xAxisItems">
</ChartCategoryAxis>
</ChartCategoryAxes>
<ChartTitle Text="Quarterly revenue per product"></ChartTitle>
<ChartLegend Position="ChartLegendPosition.Right">
</ChartLegend>
</TelerikChart>
@code {
public List<object> series1Data = new List<object>() { 10, 2, 5, 6 };
public List<object> series2Data = new List<object>() { 5, 8, 2, 7 };
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
}
---
If a chart is too narrow and x-axis labels overlap, the user can zoom out and refresh the charts to allow the labels to fit. This feature request is to allow the charts to reformat themselves as the zoom level is changed (without having to refresh the page). Steps to reproduce:
When I place a Chart in a small container, for example, a div, the labels are cut off and thus unreadable.
===
ADMIN EDIT
===
A possible workaround for the time being is changing the position of the labels so they are not cut off. For example: https://blazorrepl.telerik.com/mHkNkCEC16hMJnTg26.
Hello,
Please allow us to distinguish which mouse button triggered the SeriesClick event.
After updating the chart data, some elements remain in the DOM. This can clutter the browser if the data updates come in on intervals and the chart remains in operation for a while. A screenshot is attached below.
MCVE:
@
using
Telerik.Blazor
@
using
Telerik.Blazor.Components.Button
@
using
Telerik.Blazor.Components.Chart
<h3>Chart</h3>
<TelerikButton Primary=
"true"
@onclick=
"AddDataPoint"
>Add data point</TelerikButton>
<TelerikChart Transitions=
"false"
>
<TelerikChartSeriesItems>
<TelerikChartSeries Type=
"ChartSeriesType.Line"
Name=
"CPU Usage Data"
Data=
"@simpleData"
>
</TelerikChartSeries>
</TelerikChartSeriesItems>
<TelerikChartValueAxes>
<TelerikChartValueAxis Max=
"100"
Color=
"black"
></TelerikChartValueAxis>
</TelerikChartValueAxes>
<TelerikChartTitle Text=
"CPU Usage"
></TelerikChartTitle>
<TelerikChartLegend Position=
"Telerik.Blazor.ChartLegendPosition.Bottom"
>
</TelerikChartLegend>
</TelerikChart>
@code {
void
AddDataPoint()
{
Random random =
new
Random();
var _val = Math.Round((random.NextDouble() * 100), 3);
if
(simpleData.Count >= 60)
{
simpleData = simpleData.TakeLast(59).ToList();
}
simpleData.Add(_val);
//StateHasChanged();
}
public
List<
object
> simpleData =
new
List<
object
>();
}
---
ADMIN EDIT
Screen recording attached below, code to reproduce it too.
---
How do I stop a column chart generating over the hover-over effect?
The property exists in the Kendo Chart.
The code below does not produce a chart series with a line that is 50 width? What am i missing?
@page "/chartdemo"
Line series
<TelerikChart>
<ChartSeriesItems>
<ChartSeries Type="ChartSeriesType.Line" Name="Product 1" Data="@series1Data">
<ChartSeriesMarkers Size="10"></ChartSeriesMarkers>
</ChartSeries>
<ChartSeries Type="ChartSeriesType.Line" Size="10" Name="Product 2" Data="@series2Data">
<ChartSeriesLine Width="50"></ChartSeriesLine>
</ChartSeries>
</ChartSeriesItems>
<ChartCategoryAxes>
<ChartCategoryAxis Categories="@xAxisItems"></ChartCategoryAxis>
</ChartCategoryAxes>
<ChartTitle Text="Quarterly revenue per product"></ChartTitle>
<ChartLegend Position="ChartLegendPosition.Right">
</ChartLegend>
</TelerikChart>
@code {
public List<object> series1Data = new List<object>() { 10, 2, 5, 6 };
public List<object> series2Data = new List<object>() { 5, 8, 2, 7 };
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
}