Hello all, I am working with sparklines in this current project and I have a clear vision of what I want but I'm unsure how I would achieve this or if it would be possible with the component I'm using.
For this project operators select a predefined process and are supposed to view the realtime data to ensure the procedure is running smoothly. To make this easier I want to use a graph component for quick visualization. First, I make a graph of how the process should look if ran exactly correctly: ramp, dwell, and decays all take place at the exact right time and are all perfectly linear. This is why I used a sparkline in the first place, since it's so easy to just plug in points and timestamps and run.
So the example graph is fine just fine, but now I want the realtime graph to slowly look more and more like the example graph. Since the sparkline interpolates the distance between the two points on the graph it will start out looking nothing like the example graph and, if ran correctly, will slowly look more and more like it. Not really what I'm envisioning
Ideally the line on the realtime data chart would just grow and move along without the most recent point always being on the far right hand side of the component.
I tried to fill in the points that haven't been defined yet with None values, but this throws an error rather than leaving those spaces blank. Using zeros of course shoots the like straight down and is not what I'm looking for either.
I'm curious if this is even possible with sparklines and if so how I would accomplish this!
I'll provide a screenshot in case that's helpful, and clarify any points of confusion upon request.
Seems like if your x-axis were flipped it would fill without issue.
My best guess would be to transform the x-axis to flip the whole graph, so it effectively fills right to left. Not entirely sure how to accomplish that, though. AI seems to think you could accomplish it with CSS.
First of all, you have this tagged as both Perspective and Vision. Which module is it that you're using? I imagine the solution will be quite different depending.
Next, can you clarify how you are driving the real time data? Is it a timer script, a binding, etc?
you're right, not sure how I got the vision tag on there. I am asking specifically about the perspective sparkline component.
Currently I am using arbitrary data to fill this but when the project is live I intend on using a tag historian with and a custom script. I intend on posting values to the chart on a 30 second basis, and either averaging the total values taken between those intervals or just the current value at that time. This is will just depend on what the project users will prefer at that time. Either way I want the x axis to hold a value (representative of elapsed minutes) rather than a timestamp.
What I have found thus far working on this on my own is that the behavior I'm wanting can definitely be achieved using the xy chart component. I'll attach images and I'm sure that will help to define exactly what I'm looking for.
My current plan is to flush this out in an xy graph, but I'm still curious about the original question for future development or others on the forum that have restraints requiring a sparkline. How would a similar behavior be achieved for a sparkline: a chart that has an actively moving line that grows from left to right without forcing the rightmost value to be at the end of the chart? Maybe not possible for sparkline as this really may not be the intended purpose.