Commit bcf6b4d6 by Vik Paruchuri

Add tooltip support

parent e98a07ca
...@@ -27,11 +27,13 @@ function render{{graph_name}}() ...@@ -27,11 +27,13 @@ function render{{graph_name}}()
hoverable: true hoverable: true
}, },
xaxis: { xaxis: {
mode: null,
axisLabel: "{{x_label}}", axisLabel: "{{x_label}}",
min: {{x_min}}, min: {{x_min}},
max: {{x_max}} max: {{x_max}}
}, },
yaxis: { yaxis: {
mode: null,
axisLabel: "{{y_label}}" axisLabel: "{{y_label}}"
}, },
series: { series: {
...@@ -42,7 +44,7 @@ function render{{graph_name}}() ...@@ -42,7 +44,7 @@ function render{{graph_name}}()
fill: true fill: true
} }
}, },
tooltip: false, tooltip: true,
tooltipOpts: { tooltipOpts: {
content: "Score: %x Count: %y", content: "Score: %x Count: %y",
shifts: { shifts: {
......
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
// helpers just for readability // helpers just for readability
FlotTooltip.prototype.isTimeMode = function(axisName, item) { FlotTooltip.prototype.isTimeMode = function(axisName, item) {
return (typeof item.series[axisName].options.mode !== 'undefined' && item.series[axisName].options.mode === 'time'); return false;
}; };
FlotTooltip.prototype.isXDateFormat = function(item) { FlotTooltip.prototype.isXDateFormat = function(item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment