Skip to content

Commit 2158cdb

Browse files
committed
Added Pie Chart support.
1 parent e0b1ec3 commit 2158cdb

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chartist-plugin-tooltip",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"main": [
55
"./dist/chartist-plugin-tooltip.min.js"
66
],

dist/chartist-plugin-tooltip.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
var tooltipSelector = '.ct-point';
4444
if (chart instanceof Chartist.Bar) {
4545
tooltipSelector = '.ct-bar';
46+
} else if (chart instanceof Chartist.Pie) {
47+
tooltipSelector = '.ct-donut';
4648
}
49+
4750
var $chart = $(chart.container);
4851
var $toolTip = $chart
4952
.append('<div class="tooltip"></div>')

dist/chartist-plugin-tooltip.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/chartist-plugin-tooltip.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chartist-plugin-tooltip",
33
"description": "Point Labels Plugin for Chartist.js",
4-
"version": "0.0.6",
4+
"version": "0.0.7",
55
"author": "Markus Padourek",
66
"homepage": "https://github.com/Globegitter/chartist-plugin-tooltip",
77
"repository": {

src/scripts/chartist-plugin-tooltip.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
var tooltipSelector = '.ct-point';
2828
if (chart instanceof Chartist.Bar) {
2929
tooltipSelector = '.ct-bar';
30+
} else if (chart instanceof Chartist.Pie) {
31+
tooltipSelector = '.ct-slice';
3032
}
33+
3134
var $chart = $(chart.container);
3235
var $toolTip = $chart
3336
.append('<div class="tooltip"></div>')

0 commit comments

Comments
 (0)