Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXD-1317 Chart percentages don't show up in explorer #334

Merged
merged 5 commits into from
Aug 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/charts/PercentageStackedBarChart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const labelListStyle = {
fontWeight: 600,
};


// FIXME: add back in animation (https://github.com/recharts/recharts/issues/1083)
class PercentageStackedBarChart extends React.Component {
render() {
const percentageData = helper.getPercentageData(
Expand Down Expand Up @@ -63,6 +65,7 @@ class PercentageStackedBarChart extends React.Component {
dataKey={name}
stackId='a'
fill={helper.getCategoryColor(index, this.props.localTheme)}
isAnimationActive={false}
>
<LabelList dataKey={name} position='center' style={labelListStyle} formatter={helper.addPercentage} className='percentage-bar-chart__label-list' />
</Bar>
Expand Down
3 changes: 2 additions & 1 deletion src/components/charts/SummaryHorizontalBarChart/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const labelValueStyle = {
color: '#3283c8',
};

// FIXME: add back in animation (https://github.com/recharts/recharts/issues/1083)
class SummaryBarChart extends React.Component {
render() {
const barChartHeight = (this.props.data.length * this.props.barSize)
Expand All @@ -49,7 +50,7 @@ class SummaryBarChart extends React.Component {
<Tooltip formatter={helper.percentageFormatter(this.props.showPercentage)} />
<XAxis axisLine={false} tickLine={false} type='number' hide />
<YAxis axisLine={false} tickLine={false} dataKey='name' type='category' style={yAxisStyle} interval={0} />
<Bar dataKey={dataKey}>
<Bar dataKey={dataKey} isAnimationActive={false}>
{
barChartData.map((entry, index) => (
<Cell
Expand Down