mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Whoops! Fix the donut hover code.
This commit is contained in:
parent
43019eeeaf
commit
bd9f9d5580
@ -92,7 +92,7 @@ class Morris.Donut
|
|||||||
# Select the segment at the given index.
|
# Select the segment at the given index.
|
||||||
select: (idx) =>
|
select: (idx) =>
|
||||||
s.deselect() for s in @segments
|
s.deselect() for s in @segments
|
||||||
segment = @segments[idx]
|
if typeof idx is 'number' then segment = @segments[idx] else segment = idx
|
||||||
segment.select()
|
segment.select()
|
||||||
@setLabels segment.data.label, @options.formatter(segment.data.value)
|
@setLabels segment.data.label, @options.formatter(segment.data.value)
|
||||||
|
|
||||||
|
@ -158,7 +158,11 @@
|
|||||||
s = _ref[_i];
|
s = _ref[_i];
|
||||||
s.deselect();
|
s.deselect();
|
||||||
}
|
}
|
||||||
|
if (typeof idx === 'number') {
|
||||||
segment = this.segments[idx];
|
segment = this.segments[idx];
|
||||||
|
} else {
|
||||||
|
segment = idx;
|
||||||
|
}
|
||||||
segment.select();
|
segment.select();
|
||||||
return this.setLabels(segment.data.label, this.options.formatter(segment.data.value));
|
return this.setLabels(segment.data.label, this.options.formatter(segment.data.value));
|
||||||
};
|
};
|
||||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user