Use datasource label for tooltip title

This commit is contained in:
cmack 2020-08-28 14:47:03 +01:00
parent ab073c1874
commit 72bb96f19d
2 changed files with 10 additions and 3 deletions

View File

@ -123,7 +123,11 @@
if (notNull(yTickTextOffset)) { if (notNull(yTickTextOffset)) {
chart.yTickTextOffset(yTickTextOffset) chart.yTickTextOffset(yTickTextOffset)
} }
tooltip.title(tooltipTitle || "Groupedbar Title") if (notNull(tooltipTitle)) {
tooltip.title(tooltipTitle)
} else if (datasource.label) {
tooltip.title(datasource.label)
}
} }
function bindChartEvents() { function bindChartEvents() {

View File

@ -205,8 +205,11 @@
if (notNull(lines)) { if (notNull(lines)) {
chart.lines(lines) chart.lines(lines)
} }
if (notNull(tooltipTitle)) {
tooltip.title(tooltipTitle || "Line Tooltip") tooltip.title(tooltipTitle)
} else if (datasource.label) {
tooltip.title(datasource.label)
}
} }
function bindChartEvents() { function bindChartEvents() {