How to pass data in x-axis echarts flutter - flutter

I have set of timestamps values from api and it's realtime. For every 5000ms i need to change the data in x-axis. I am using type as 'time' to plot timestamp values. How to change the timestamp values to format (06:00:30) . Also how to push the x-axis data for every 5000 milliseconds.
Any help could be really appreciated

Related

Power Bi Plot dataset with x-axis dates

I am working with a dataset with which I am creating a dashboard. My dataset is very simple, a first column of [yyyy-mm-dd-hh-mm], and a second column with many values.
I read in many threads and forum about the difficulty to plot dates on x-axis (including hours and minuts).
As reference I am using this dashboard built in PowerBi https://www.terna.it/it/sistema-elettrico/transparency-report/total-load .(Public data of Italian electric energy generation)
This is exactly the outcome I would like to obtain, but by now I cannot display the hours and minuts. I used their data to reproduce the dashboard.
I tried to switch from a "dates" x-axis to a "text" x-axis, but the result is not the same, and furthermore the plot does not occupy the whole page but I have to move to the right.
enter image description here
I really cannot understand how the linked dashboard was built.
Any idea?
I guess your problem is that you have been using Date Hierarchy on the x-Axis you instead of Date only.

Highstock charts - Show the blank space up to the current date

Currently, I'm having trouble to force the highstock chart to display a blank space up to the current date. It focuses the data I give it.
What I have is:
What I want is something like this
As you can see I want the data to stop at the date of the latest data point and then the graph should show a blank space and stop at the current date. Obv there is not data points for those times
You can control how empty points, and missing points are shown by looking at:
xAxis.ordinal
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data periods (e.g. nights or weekends for a stock chart) will not take up space in the chart. Having ordinal: false will show any gaps created by the gapSize setting proportionate to their duration.
xAxis.max
The maximum value of the axis. If null, the max value is automatically calculated.
plotOptions.series.connectNulls
Whether to connect a graph line across null points, or render a gap between the two points on either side of the null.
Which means that for your graph, you will want to set:
xAxis: {
ordinal: false,
max: (new Date()).getTime() //to set the current date and time as a maximum
}

How to show time in minutes.seconds.milliseconds on jqPlot Line chart x-axis

We have a local webserver which collects data from hardware and another web based app that shows the data on a line chart using JqPlot. Data fetch is done through Ajax.
I wish to show multiple data series on line chart, all having same xaxis values (the time value). The xaxis should be able to show time in minutes.seconds.milliseconds.
I have tried regular lineAxesRenderer, which is good, but shows only upto 1 decimal point, i.e. 25.1 to 25.2. If we have data that changes mutliple times within 100ms, we get different Y values for the same x value. This makes the graph look jagged, when actually we are getting different values for different time stamps.
I have also tried DateAxisRenderer, however in that case...the call to replot() to change the axis before redraw() simply fails. The x-axis data I am sending to the client is "H:M:S.MS" format. My options for x-axis are as follows:
xaxis : {
label : "Time (s)",
show : true,
renderer:$.jqplot.DateAxisRenderer,
rendererOptions : {tickRenderer: $.jqplot.CanvasAxisTickRenderer},
tickOptions: {formatString: "%H:%M:%S.%N"},
tickInterval:'500', // javascript timestamps are in milliseconds
},
What am i doing wrong here?
How do i show 2 or 3 decimal places on the x-axis if I use simple lineAxisRenderer?
Thanks and best regards,
Vishal

Can I hide column but no trendline in Google Charts?

I've got a Google Line Chart with date column and few numeric columns. I've also added the numeric "average" column. And for this average i want to display trendline but don't want to display average data points.
When i use this, there is no data for avg column but there is also no trendline:
var dataTable = new google.visualization.DataView(dataTable);
dataTable.hideColumns([5]);
How would I be able to still load column average's trendline, but just hide the column so that it is values not getting displayed? Every little help would be much appreciated.

d3 tooltip/popup for multiple data series?

I'm looking for a way to display a tooltip/popup in d3 that shows all data for a certain timestamp. I'm displaying up to five data series at once and sometimes, but not always, there are data from two or more data series at the same timestamp, and those I want to show when move the mouse along the x-axis.
Can this be done?
My solution for my problem was to write some own functions that first get the x-position where I click on the chart, convert that to a valid timestamp. Then matching with nearest actual timestamp in the dataseries. Then I show a rect as a window with the data at that timestamp for all series that has data at that timestamp.