Refreshing streaming chart #4223
-
Hey guys, I have a question regarding the streaming chart: https://blazorise.com/docs/extensions/chart-live I m planning a real time chart for a sensors values. With chartjs it's easy via reducing the refresh parameter: https://nagix.github.io/chartjs-plugin-streaming/latest/samples/charts/line-horizontal.html Is the same behavior possible with blazorise streaming chart? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, it's possible. The refresh parameter is the part of the streaming options. Here is the full object for comparison: public class ChartStreamingOptions
{
/// <summary>
/// Duration of the chart in milliseconds (how much time of data it will show).
/// </summary>
public int Duration { get; set; } = 10000;
/// <summary>
/// Refresh interval of data in milliseconds. onRefresh callback function will be called at this interval.
/// </summary>
public int Refresh { get; set; } = 1000;
/// <summary>
/// Delay added to the chart in milliseconds so that upcoming values are known before lines are plotted. This makes the chart look like a continual stream rather than very jumpy on the right hand side. Specify the maximum expected delay.
/// </summary>
public int Delay { get; set; } = 0;
/// <summary>
/// Frequency at which the chart is drawn on a display (frames per second). This option can be set at chart level but not at axis level. Decrease this value to save CPU power (https://github.com/nagix/chartjs-plugin-streaming#lowering-cpu-usage).
/// </summary>
public int FrameRate { get; set; } = 30;
} |
Beta Was this translation helpful? Give feedback.
-
You are right, I ve seen this class, but my fault was trying to modify the options of the linechart. This is the solution:
Thank you so much! |
Beta Was this translation helpful? Give feedback.
Yes, it's possible. The refresh parameter is the part of the streaming options. Here is the full object for comparison: