Please look at the graph i am generating. I want to add a reference line which is the average of all the points on the graph. I want it dynamically calculated. How can i do that?
{
“xAxis”: {
"type": "datetime",
"dateTimeLabelFormats": {
"day": "%d %b",
"week": "%d %b",
"month": "%d %b",
"year": "%d %b"
},
"labels": {
"format": "{value:%d %b}",
"style": {
"color": "#333",
"fontSize": "14px"
}
}
},
“yAxis”: {
"title": {
"text": "Round Time in Minutes",
"style": {
"color": "#333",
"fontSize": "14px",
"fontWeight": "bold"
}
}
},
“tooltip”: {
"shared": true,
"pointFormat": "Round Time: {point.y:.2f}<br/>"
},
“series”: [
{
"type": "line",
"color": "red",
"opacity": 0.7,
"name": "April",
"data": \[
"map",
\[
"filter",
\["getColumn", 0, 1, 2\],
\["==", \["get", \["item"\], 1\], 4\]
\],
{
"x": \["get", \["item"\], 0\],
"y": \["get", \["item"\], 2\]
}
\]
}
]
}

