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)) {
chart.yTickTextOffset(yTickTextOffset)
}
tooltip.title(tooltipTitle || "Groupedbar Title")
if (notNull(tooltipTitle)) {
tooltip.title(tooltipTitle)
} else if (datasource.label) {
tooltip.title(datasource.label)
}
}
function bindChartEvents() {

View File

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