Reputation: 15742
I am using most beautiful javascript plotting plugin flot
for depicting some real time data with the help of line chart.
And I have following set of options:
{
colors: ['#7999BB'],
grid: { borderWidth: 1, borderColor:"#4572A7"},
xaxis: {
axisLabel: "Time (H:M)",
axisLabelUseCanvas: true,
axisLabelFontSizePixels: 11,
axisLabelFontFamily: 'sans-serif',
axisLabelPadding: 9,
mode:"time",
tickSize: [25, "minute"],
tickLength:5,
tickFormatter: function (v, axis) {
var date = new Date(v);
var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
var minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
var seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
return hours + ":" + minutes;
}
},
series: { shadowSize: 0,
lines: {
show: true,
lineWidth: 1.2,
fill: true,
fillColor: { colors: [ { opacity: 0.3 }, { opacity: 0 } ] }
}
},
yaxis: { show: true,
min:0,
}
}
Everything is working fine. But I want to highlight single point in graph.I tried using
plot.highlight(seriesIndex,dataPoint);
I did
plot.highlight(0, 99);
0 - I have just single series.
99 - I am plotting 100 points and lets say for example I want to highlight 99th point.
No error on console. But it's not working? How do I highlight point in time series graphs?
Any help would be highly appreciated.
Upvotes: 1
Views: 3196
Reputation: 15742
After a long waste research n unnecessary panic I found a solution.Actually the issue was related to flot version.It worked fine with latest flot 0.8.1.
plugin.Thanks for your precious time and help.
Upvotes: 1