Can the dev team comment on any known reasons why Charts (I think both SVG and Canvas) might not display when a blazor page is rendered from an automation tool like Chromium, Puppeteer, etc.? (e.g., https://developers.google.com/web/tools/puppeteer).
I have a standard blazor page that I can manually from a standard Chrome window, and it works fine and the Telerik chart displays.
But the same page, when launched either headless or with a GUI browser window, from a tool like Chromium or Puppeteer (with javascript enabled of course), it seems like the DOM is never dynamically updated to include the chart.
For real-time data purposes, I need to update the data and add new items. If I drill down and then add a new item, the Chart refreshes and goes to the top page (resets the drill down level to 0).
Reproduction: https://blazorrepl.telerik.com/QeOtQaOD46j4I3Ih46.
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 },
};
}
Our Site supports multiple themes that we have built using the SASS Theme Builder. For all Telerik Components we have used so far the theme changes on them as expected when using the example found here (Change Theme at Runtime). The problem seems to be the chart component will not adhere to the newly applied theme after its initial load. Seems like this is because it is shown as an SVG with hardcoded attributes on the element. Is there a workaround for this (other than reloading the components entirely)?
Before & After Theme Change:
To reproduce the problem, hover over the last value of the series. While the Tooltip enters, it causes horizontal and vertical scroll and flickers. Then, it is positioned correctly.
The issue is better observed if you increase the transition speed of the Tooltip wrapper.
Reproduction: https://blazorrepl.telerik.com/cREDloaV42j7Z19G13.
===
ADMIN EDIT
===
A possible workaround for the time being is to alter or stop the Tooltip animation with CSS. Here is a runnable sample demonstrating the approach: https://blazorrepl.telerik.com/QnEjvIOC04hXA6W709
The Scatterline Chart is flipped upside down if the Height is under 100px.
ReproductionHi,
We are implementing chart control in our application and we noticed spikes in the chart when we are using time series that contains UTC timestamps with milliseconds that are divisible by 100. The issue is reproduceable on Telerik REPL as well and I am attaching the REPL link as well
I was wondering if you guys can provide some insight from your end as to whether that is indeed a bug and some work arounds and timeline on when we can resolution from your end.
Cheers,
Danish Shahid
Currently, the Chart does not plot anything when zero values are included in the dataset on a logarithmic axis.
Reproduction: https://blazorrepl.telerik.com/cdYgkWFH23W9PVon54
At least the "Success" data should be plotted.
I am trying to programmatically update the Chart data during runtime to display live data. The Chart does not seem to refresh and show this change in the viewport.
I've tried:
The result is the same - the Chart does not react to the data change. This applies to other component parameters as well.
===
ADMIN EDIT
===
A possible workaround for the time being is forcing the Chart to re-render. To do so, you may wrap the Chart in a custom component and call StateHasChanged() in this component when the data is updated.Hi,
Just a bug I have found. I have found something similar before with the DateTime format of a category axis.
Please note the single lowercase 't' in the below appears to be being interpreted by the compiler as 'time' identifier (AM or PM). In this case, it is printing on the chart label as 'a'.
<ChartValueAxes>
<ChartValueAxis AxisCrossingValue="@AxisCrossingValue">
<ChartValueAxisLabels Format="@("{0}" + " a b c d e f g h i j k l m n o p q r s t u v w x y z")"></ChartValueAxisLabels>
</ChartValueAxis>
</ChartValueAxes>
I am trying to customize the format of the ChartCategoryAxisLabels to render the abbreviated name of the day of the week using the following format:
<ChartCategoryAxisLabels Format="ddd dd/MM HH:mm"/>
While it is a valid format, it seems that it doesn't work for the category labels.
---
ADMIN EDIT
---
For the time being, you can use the following to render the abbreviated name of the day of the week in the ChartCategoryAxisLabels:
<ChartCategoryAxisLabels Format="{0:EEE dd/MM HH:mm}"/>
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
>();
}
The additional functionality of the stock chart (crosshairs, navigator) fits our needs very well, but our data is not currency formatted. As far as we have found, we have not seen a way to remove currency as a default format. I'm not sure if this is a bug, or intended functionality; but it's preventing us from rolling charts with that extended functionality.
---
ADMIN EDIT
Screen recording attached below, code to reproduce it too.
---
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
I have a line chart I am using to plot two related series of data. When these two series have the same values, or very similar values, the series that is second in the render order completely covers up the first line. This makes it look like the first line isn't being rendered, and makes it impossible to access the tooltips for the first series. I need a way to disambiguate overlapping data.
Thank you