Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 54c93cf

Browse files
myan9starpit
authored andcommitted
fix(plugins/plugin-client-common): histogram animate is slow with large data
Fixes #7193
1 parent 82acb4f commit 54c93cf

File tree

1 file changed

+2
-3
lines changed
  • plugins/plugin-client-common/src/components/Content/Table

1 file changed

+2
-3
lines changed

plugins/plugin-client-common/src/components/Content/Table/Histogram.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import React from 'react'
1818
import stringColoring from 'string-similarity-coloring'
1919
import { REPL, Row, sameRow, Tab, Table } from '@kui-shell/core'
20-
import { Chart, ChartAxis, ChartBar, ChartLabel, ChartVoronoiContainer } from '@patternfly/react-charts'
20+
import { Chart, ChartAxis, ChartBar, ChartLabel } from '@patternfly/react-charts'
2121

2222
interface Props {
2323
response: Table
@@ -166,7 +166,6 @@ export default class Histogram extends React.PureComponent<Props, State> {
166166
private rows() {
167167
return (
168168
<Chart
169-
animate={this.state.animate && { onLoad: { duration: 0 }, duration: 200 }}
170169
domainPadding={10}
171170
height={this.state.rows.length * this.barHeight * (1 + this.barSpacing)}
172171
horizontal={this.horizontal}
@@ -176,7 +175,6 @@ export default class Histogram extends React.PureComponent<Props, State> {
176175
top: 0,
177176
bottom: 0
178177
}}
179-
containerComponent={<ChartVoronoiContainer constrainToVisibleArea />}
180178
>
181179
{this.axis()}
182180
{this.bars()}
@@ -206,6 +204,7 @@ export default class Histogram extends React.PureComponent<Props, State> {
206204
private bars() {
207205
return (
208206
<ChartBar
207+
animate={this.state.animate && { onLoad: { duration: 0 }, duration: 200 }}
209208
barWidth={this.barHeight}
210209
scale={{ y: this.state.scale }}
211210
style={{

0 commit comments

Comments
 (0)