Created a new tooltip when click in a value to have different external links. Which links can be created with values from the series.

This commit is contained in:
Joaquin Jimenez Garcia
2020-02-04 16:31:43 +01:00
parent 1e7ef33b67
commit 18574c3fa1
38 changed files with 1241 additions and 63 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ System.register(["lodash", "jquery", "d3", "./libs/d3-scale-chromatic/index", "a
drawLegendValues(elem, opacityScale, rangeFrom, rangeTo, maxValue, minValue, legendWidth);
}
function drawDiscreteColorLegend(elem, colorOptions, discreteHelper) {
function drawDiscreteColorLegend(elem, colorOptions, discreteExtraSeries) {
var legendElem = $(elem).find('svg');
var legend = d3.select(legendElem.get(0));
clearLegend(elem);
@@ -87,7 +87,7 @@ System.register(["lodash", "jquery", "d3", "./libs/d3-scale-chromatic/index", "a
return d * itemWidth;
}).attr("y", 0).attr("width", itemWidth + 1) // Overlap rectangles to prevent gaps
.attr("height", legendHeight).attr("stroke-width", 0).attr("fill", function (d) {
return discreteHelper.getDiscreteColor(d);
return discreteExtraSeries.getDiscreteColor(d);
});
drawDiscreteLegendValues(elem, colorOptions, legendWidth);
}
@@ -378,7 +378,7 @@ System.register(["lodash", "jquery", "d3", "./libs/d3-scale-chromatic/index", "a
drawOpacityLegend(elem, colorOptions, rangeFrom, rangeTo, maxValue, minValue);
} else if (panel.color.mode === 'discrete') {
var _colorOptions = panel.color;
drawDiscreteColorLegend(elem, _colorOptions, ctrl.discreteHelper);
drawDiscreteColorLegend(elem, _colorOptions, ctrl.discreteExtraSeries);
}
}
}