Skip to content

Commit 8642904

Browse files
author
Mostafa Kamal
committed
tooltips
Co-Authored-By: Mostafa Kamal <radionishi@gmail.com>
1 parent e824d80 commit 8642904

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

dist/setup.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ module.exports = function setup(chartEl) {
108108
},
109109
tooltips: {
110110
enabled: is_tooltips,
111-
// backgroundColor: 'red'
111+
backgroundColor: chartEl.tooltipsBg,
112+
bodyFontSize: chartEl.tooltipsFontSize,
113+
bodyFontColor: chartEl.tooltipsFontColor,
114+
bodyFontFamily: chartEl.tooltipsFontFamily,
115+
xPadding: chartEl.tooltipsXpad || 10,
116+
yPaading: chartEl.tooltipsYpad || 10,
112117
},
113118
hover: {
114119
mode: is_hover

docs/readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ fontColorX: string
7878
fontColorY: string
7979
fontFamilyX: string
8080
fontFamilyY: string
81+
tooltipsBg: string
82+
tooltipsFontSize: number
83+
tooltipsFontColor: string
84+
tooltipsFontFamily: string
85+
tooltipsXpad: number
86+
tooltipsYpad: number
8187
```
8288

8389

src/setup.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ module.exports = function setup(chartEl) {
108108
},
109109
tooltips: {
110110
enabled: is_tooltips,
111-
// backgroundColor: 'red'
111+
backgroundColor: chartEl.tooltipsBg,
112+
bodyFontSize: chartEl.tooltipsFontSize,
113+
bodyFontColor: chartEl.tooltipsFontColor,
114+
bodyFontFamily: chartEl.tooltipsFontFamily,
115+
xPadding: chartEl.tooltipsXpad || 10,
116+
yPaading: chartEl.tooltipsYpad || 10,
112117
},
113118
hover: {
114119
mode: is_hover

0 commit comments

Comments
 (0)