Skip to content

Commit

Permalink
fix(sunburst): apply my own fixes from pr review
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Nov 7, 2020
1 parent 1b3dd8f commit cbb9e37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sunburst/src/Sunburst.js
Expand Up @@ -8,7 +8,6 @@
*/
import React from 'react'
import PropTypes from 'prop-types'
import { noop } from '@nivo/core'
import sortBy from 'lodash/sortBy'
import cloneDeep from 'lodash/cloneDeep'
import compose from 'recompose/compose'
Expand All @@ -19,6 +18,7 @@ import pure from 'recompose/pure'
import { partition as Partition, hierarchy } from 'd3-hierarchy'
import { arc } from 'd3-shape'
import {
noop,
withTheme,
withDimensions,
getAccessorFor,
Expand Down
2 changes: 1 addition & 1 deletion packages/sunburst/src/SunburstLabels.js
Expand Up @@ -17,7 +17,7 @@ const sliceStyle = {
export default class SunburstLabels extends Component {
static propTypes = {
nodes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
label: PropTypes.func.isRequired,
skipAngle: PropTypes.number.isRequired,
textColor: PropTypes.func.isRequired,
theme: PropTypes.shape({
Expand Down
6 changes: 3 additions & 3 deletions website/src/pages/sunburst/index.js
Expand Up @@ -75,9 +75,9 @@ const Sunburst = () => {
onClick={node =>
logAction({
type: 'click',
label: `[sunburst] ${node.id} - ${node.value}: ${Math.round(
node.percentage * 100
) / 100}%`,
label: `[sunburst] ${node.id} - ${node.value}: ${
Math.round(node.percentage * 100) / 100
}%`,
color: node.color,
data: node,
})
Expand Down

0 comments on commit cbb9e37

Please sign in to comment.