I’m trying to develop a graph to analyze the energy consumed daily in peak demand and off-peak demand, I have these two values being stored in an attribute of my device but I don’t know how to manipulate these variables to generate a graph similar to the one shown in the figure Below, I have a basic layout of the graph that was taken from the Vega lite platform, I would like to know if anyone can help me.
I also have an example using Chart JS
Could you make a Time Series Graph with the following configuration?
- Duration: 30 days
- Resolution: 1 day
- Aggregation (on each segment): Sum
I don’t know what your underlying data looks like; this assumes that what you are reporting up to the platform is the periodic power usage since the last report - i.e., 1 kWh since the last time the device reported state.
If I want show the same graph on the stacked bar format, similar to the one shown in the figure Below, how must procedure?
Sorry, but writing Vega chart specifications is not something we can provide support for.
We do have several examples in our documentation. The main difference between your example and how to build a Vega chart in Losant is that you must reference named data sources for accessing the data in your Losant queries.