The Chart Tooltip does not render correct values for the data points when the chart is bound to a model, has multiple series and Template is used. The DataItem does not seem to work as expected.
ADMIN EDIT:
If the Chart is bound with Independent Series Binding the FormattedValue will get the correct values.
If the Chart has no Template the correct values for the data points will be displayed
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" };
}
It would be nice to make the label container less than the width of the element so that it stands out more.
I know that it can be set to different colors and transparent but adjusting the width would be a nice addition as well.
Hi!
I'm more than a little impressed with your Blazor efforts to-date, but there's one component lacking: a CandleStick chart.
Hi,
I would like to be able to show / hide a serie by clicking to a legend.
Is there a way to do it actually ?
I would like to visually distinguish a certain element in a series from the others if its value matches a given criteria (for example, value exceeds a threshold). Ideally, I'd want to add a hash to my bars, because I want to keep all items with the same color (I don't want to use the ColorField).
Something similar is available in Kendo: https://demos.telerik.com/kendo-ui/bar-charts/visuals.
Hi!
I'm building a Blazor Component using your TelerikChart. To build my chart, I'm dynamically inserting the series name and the series data, which is pulled from a list. I also have a button on the page that changes the dataset (last month, this month, next month, etc). The button will rebuild the list of names and data, and Blazor will build the chart with a 'foreach' entry in the ChartSeriesItems section of the Chart Component.
The problem is that the Items are not cleared each time. When I click the button, I'm getting previous values. In the example below, I have 3 data sets. The first has 4 items, the second has 8 and the third has 6. If the user clicks the second, showing all 8, then clicks the first, the chart will show the new 4, and the previous 5-8 from the second set.
My chart description in HTML is:
...
<ChartSeriesItems>
@foreach(Tuple<string, object[]> t in myData)
{
<ChartSeries Type="ChartSeriesType.Column" Name=@t.Item1 Data=@t.Item2 />
}
</ChartSeriesItems>
...
I have checked my data through debugging to ensure that the myData variable is correct (i.e. when I click the first data, it only has 4 items). However, when the chart displays, it shows 8 items.
Is there a CLEARDATA method or something I can call on the Chart to ensure that the data is reset each time? I see that there is a Clear() in JavaScript, but I'm writing in only Blazor and C#, with no JavaScript.
I've attached the .razor page for your reference. (As this is my test code, I'm using random number generation to get the data.)
Thank you so much for your help!!
-Cheryl Simpson
Hi, I can't figure how to use the Min/Max properties of the ChartCategoryAxis because if I set these properties, the chart disappears.
Please help me.
@page "/"
<TelerikChart>
<ChartSeriesItems>
<ChartSeries Type="ChartSeriesType.Line" Name="Test" Data="@mesures"
Field="@nameof(Mesure.Value)" CategoryField="@nameof(Mesure.Date)" Aggregate="ChartSeriesAggregate.Sum">
</ChartSeries>
</ChartSeriesItems>
<ChartCategoryAxes>
<!-- This is OK -->
@*<ChartCategoryAxis BaseUnit="ChartCategoryAxisBaseUnit.Hours" Type="ChartCategoryAxisType.Date" BaseUnitStep="1"></ChartCategoryAxis>*@
<!-- This isn't : nothing is displayed -->
<ChartCategoryAxis Min="@MinDate" Max="@MaxDate" BaseUnit="ChartCategoryAxisBaseUnit.Hours" Type="ChartCategoryAxisType.Date" BaseUnitStep="1"></ChartCategoryAxis>
</ChartCategoryAxes>
</TelerikChart>
@code {
private DateTime MinDate { get; set; } = new DateTime(2019, 01, 01, 13, 0, 0);
private DateTime MaxDate { get; set; } = new DateTime(2019, 01, 01, 17, 0, 0);
public class Mesure
{
public DateTime Date { get; set; }
public int Value { get; set; }
}
public List<Mesure> mesures = new List<Mesure>()
{
new Mesure() { Date = new DateTime(2019, 01, 01, 13, 0, 0), Value = 1 },
new Mesure() { Date = new DateTime(2019, 01, 01, 14, 0, 0), Value = 2 },
new Mesure() { Date = new DateTime(2019, 01, 01, 14, 30, 0), Value = 3 },
new Mesure() { Date = new DateTime(2019, 01, 01, 14, 35, 0), Value = 4 },
new Mesure() { Date = new DateTime(2019, 01, 01, 15, 0, 0), Value = 5 },
new Mesure() { Date = new DateTime(2019, 01, 01, 16, 0, 0), Value = 6 },
new Mesure() { Date = new DateTime(2019, 01, 01, 17, 0, 0), Value = 7 },
};
}
It would be helpful to me if this chart type was supported.
I have a page where I am displaying a chart and associated data in a grid below.
Being able to range select in the chart like in the asp.net core link below would offer a much better user experience.
That way the selected range could be specifically targeted in the grid data below the chart.
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: