Skip to content

Commit

Permalink
Include an item's value on pie slices and bars - usable by tooltips f…
Browse files Browse the repository at this point in the history
…or example.
  • Loading branch information
benpickles committed Mar 9, 2017
1 parent 7090107 commit 22f7ad9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jquery.peity.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,14 @@
'A', radius, radius, 0, 1, 1, x2, y1,
'L', x2, y2,
'A', innerRadius, innerRadius, 0, 1, 0, cx, y2
].join(' ')
].join(' '),
'data-value': value,
})
} else {
$node = svgElement('circle', {
cx: cx,
cy: cy,
'data-value': value,
r: radius
})
}
Expand All @@ -219,7 +221,8 @@
cumulative += value

$node = svgElement('path', {
d: d.join(" ")
d: d.join(" "),
'data-value': value,
})
}

Expand Down Expand Up @@ -370,6 +373,7 @@

$svg.append(
svgElement('rect', {
'data-value': value,
fill: fill.call(this, value, i, values),
x: x,
y: y1,
Expand Down

0 comments on commit 22f7ad9

Please sign in to comment.