This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
plugins/plugin-client-common/src/components/Content/Table Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ export default class Histogram extends React.PureComponent<Props, State> {
57
57
private readonly barLabelFontSize = 0.65 * this . barHeight
58
58
private readonly minBarLabelChars = 1
59
59
private readonly maxBarLabelChars = 6
60
+ private static readonly maxAnimatableRows = 50 // Victory doesn't seem to animate well when a great many rows; too much lag
60
61
61
62
public constructor ( props : Props ) {
62
63
super ( props )
@@ -93,9 +94,9 @@ export default class Histogram extends React.PureComponent<Props, State> {
93
94
if ( ! useFancyColoring ) {
94
95
const filteredRows = filteredRowsPriorToSorting
95
96
return {
96
- animate : true ,
97
97
rows : filteredRows ,
98
98
counts : filteredRows . map ( countOf ) ,
99
+ animate : filteredRows . length < Histogram . maxAnimatableRows ,
99
100
scale : filteredRows . length === rows . length ? 'linear' : 'log' ,
100
101
colors : undefined
101
102
}
@@ -127,9 +128,9 @@ export default class Histogram extends React.PureComponent<Props, State> {
127
128
const filteredRows = filteredRowsForSorting . map ( _ => _ . row )
128
129
129
130
return {
130
- animate : true ,
131
131
rows : filteredRows ,
132
132
counts : filteredRows . map ( countOf ) ,
133
+ animate : filteredRows . length < Histogram . maxAnimatableRows ,
133
134
scale : filteredRows . length === rows . length ? 'linear' : 'log' ,
134
135
colors : filteredRowsForSorting . map ( _ => _ . color . color )
135
136
}
You can’t perform that action at this time.
0 commit comments