I have a time series chart in Perspective displaying real time data (tied to a tag history binding). Is there a way to show a vertical marker, similar to the horizontal marker? I would want its "value" (i.e. what time it is tied to) to be configurable. I understand the logic behind something like this would work completely differently than the horizontal marker due to the nature of realtime data... it would slide off the edge of the chart over time, so to speak.
Just thinking out loud here, if you know the time range of the chart could you utilize an XY container and overlay a line? Then determine line position based on a calculation of the time span and the pixel width of the chart?
Frank
I'd like to do something like this as well. The problem I see with using a coordinate container to overlay something on top is that it would prevent the xTrace popup from appearing on mouse over.
My boss is wanting to add annotated notes at certain points along the timeline...
EDIT: I've succeeded in doing the annotated notes overlay. The only issue is that when the pan/zoom is used, the position of the overlay becomes inaccurate. I could remedy this if the time series chart maintained viewport start and end times, as I could then recalculate the position of the overlay(s).
Any updates on this in particular? Apart from using overlays?
I'd recommend using the annotations feature of ApexCharts rather than trying to make something work with the built-in time-series chart.
I did figure out a way to do this. Example use case is marking instances of scrapped parts like in the below image.
The main key was figuring out how to pull my data in. For this data source, each data point gets pulled in with a timestamp (x) and a simple integer value (y) corresponding to its sequential placement on the chart -- the first data point on the chart has a y value of 1, the next one has a y value of 2, then 3, and so on. I did this through manipulation of my named query; nothing on the chart side yet. Keep in mind my chart is on a percentage scale with a max of 100%, i.e. 1. So technically the tops of the red lines are getting taller and taller as you move from left to right, but we don't see this visually. I am only including this detail to help you visualize what is happening and adapt my logic for your use case. This method has the added benefit of working with X trace -- you can click any location on the chart to see a quick count of how many parts have been scrapped up until that particular point in time using the built-in X-trace feature.
From here, I am speaking from memory... I had to change this trend from a line chart to a bar chart, use a curveStep interpolation method, and I believe I had to turn the fill area opacity to 0 maybe? Whatever it was, the end result was a thin vertical line appearing at each x value in the dataset. Let me know if you need more info and I can dig into the project files and get you an exact answer.