I'm migrating some old PHP web pages to Perspective. The original is generated using jqPlot which has the nice feature of being able to add in in the batch sequence numbers shown in green circles on the chart below. The batch sequence number is repeated in a table below the chart. This makes it easy to find the batch's corresponding row in the table.
Can anyone think of a way of achieving a similar result in Perspective's XY Chart?
I can generate datapoints with X value to match the end of weighout and a constant Y-value of 70 kg.
How could I generate the labels?
How could I embed the 1, 2, 3, ... batch numbers?
Create a batch-number dataset with (t_stamp, number) pairs. Number is in sequence 1, 2, 3, etc.
Create another y-axis. I set the axis range to very large numbers so that the difference in vertical position of my batch numbers is not discernable. In my case I made it max : 1000 and min : -10000. This forces the zero line above the top of my other charts.
Add another series and set it to line. Bind it to the batch-number dataset.
I don't think one can do that. The tooltips can read {valueY} but not other columns in the dataset. I've posted some work on the XY Chart tooltips here. In any case they don't appear until the user hovers over the point so - no use!
I've added tooltips to the batch number bullets so now I have both.
if mean is above UCL limit or below the LCL limit. I need to show the datapoint in red color and label with number
Can you give me guidance how to achieve this in XY chart perspective
Create the labels as another series as I've described in post #2. You would write a script to only add in the labels for the out-of-band values. If you want labels over the high values and under the low values you will need two series.
Create yet another series with just the red points. Set that series with series.x.line.appearance.stroke.opacity : 0 series.x.line.appearance.bullets.0.enabled : true series.x.line.appearance.bullets.0.fill.color : red series.x.line.appearance.bullets.0.stroke.color : red