Skip to content

Commit ff2f1f8

Browse files
committed
Use the same number of colors as calcdata + 1: because that num is not always correct
1 parent 4780619 commit ff2f1f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/fields/Colorscale.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Colorscale extends Component {
1313
onUpdate(colorscale, colorscaleType) {
1414
if (Array.isArray(colorscale)) {
1515
if (this.context.container.type === 'pie') {
16-
const numPieSlices = this.context.container.labels.length;
16+
const numPieSlices = this.context.graphDiv.calcdata[0].length + 1;
1717
const adjustedColorscale = adjustColorscale(
1818
colorscale,
1919
numPieSlices,

0 commit comments

Comments
 (0)