Can you point me to an example that shows how to add annotations to a timeseries chart (highstock)?
I have been struggling to get this to work, but so far nothing yet.
The data is in the following format:
values flags
Timestamp
2014-02-28 00:00:00 1160994 OK
2014-02-28 00:15:00 0 FAULTY_ZERO
2014-02-28 00:30:00 0 FAULTY_ZERO
2014-02-28 00:45:00 1163902 OK
2014-02-28 01:00:00 1164244 OK
This is what I have been doing so far:
df_result = validation.execute("zero_reads")
print df_result['flags'].value_counts()
flags = dict(type="flags", data=[dict(x=str(k), title=v[1]) for k, v in df_result.iterrows() if v[1]!='OK'])
options = dict(title="test", annotations=flags)
charts.plot(df_result, options=options, show='inline', stock=True)
I want to show the non "OK" flags only (from the flags column) with a label showing up just above the value in the chart.
Hi Arnout,
Can you point me to an example that shows how to add annotations to a timeseries chart (highstock)?
I have been struggling to get this to work, but so far nothing yet.
The data is in the following format: values flags Timestamp
2014-02-28 00:00:00 1160994 OK 2014-02-28 00:15:00 0 FAULTY_ZERO 2014-02-28 00:30:00 0 FAULTY_ZERO 2014-02-28 00:45:00 1163902 OK 2014-02-28 01:00:00 1164244 OK
This is what I have been doing so far: df_result = validation.execute("zero_reads") print df_result['flags'].value_counts() flags = dict(type="flags", data=[dict(x=str(k), title=v[1]) for k, v in df_result.iterrows() if v[1]!='OK']) options = dict(title="test", annotations=flags) charts.plot(df_result, options=options, show='inline', stock=True)
I want to show the non "OK" flags only (from the flags column) with a label showing up just above the value in the chart.
thanks for your help!
Regards,
Edwin