mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-29 07:01:49 +00:00
Toggle showing IDs (#131)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {ChartColors} from './config';
|
||||
import {ChartColors, Ids} from './config';
|
||||
import {interpolateNumber} from 'd3-interpolate';
|
||||
import {IntlShape, useIntl} from 'react-intl';
|
||||
import {max, min} from 'd3-array';
|
||||
@@ -257,6 +257,7 @@ export interface ChartProps {
|
||||
onSelection: (indiInfo: IndiInfo) => void;
|
||||
freezeAnimation?: boolean;
|
||||
colors?: ChartColors;
|
||||
hideIds?: Ids;
|
||||
}
|
||||
|
||||
class ChartWrapper {
|
||||
@@ -418,7 +419,8 @@ export function Chart(props: ChartProps) {
|
||||
if (prevProps) {
|
||||
const initialRender =
|
||||
props.chartType !== prevProps?.chartType ||
|
||||
props.colors !== prevProps?.colors;
|
||||
props.colors !== prevProps?.colors ||
|
||||
props.hideIds !== prevProps?.hideIds;
|
||||
const resetPosition =
|
||||
props.chartType !== prevProps?.chartType ||
|
||||
props.data !== prevProps.data ||
|
||||
|
||||
Reference in New Issue
Block a user