Skip to content

Commit

Permalink
Renamed shouldRedraw to redraw to align with chart component logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-NRCan committed Oct 5, 2023
1 parent a968cfd commit 19e0eee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface TypeChartChartProps<TType extends GeoChartType> {
style?: any;
data?: GeoChartData<TType>;
options?: GeoChartOptions;
shouldRedraw?: boolean;
redraw?: boolean;
}

/**
Expand All @@ -29,7 +29,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
const w = window as any;
const cgpv = w['cgpv'];
const { Slider } = cgpv.ui.elements;
const { style, data, options, shouldRedraw } = props;
const { style, data, options, redraw } = props;

const handleChangeSliderX = (value: number | number[]) => {
console.log("X Axis", value);
Expand All @@ -49,7 +49,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
type="bar"
data={data as ChartData<'bar', DefaultDataPoint<'bar'>, string>}
options={options as ChartOptions<'bar'>}
redraw={shouldRedraw}
redraw={redraw}
/>
);

Expand All @@ -60,7 +60,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
type="pie"
data={data as ChartData<'pie', DefaultDataPoint<'pie'>, string>}
options={options as ChartOptions<'pie'>}
redraw={shouldRedraw}
redraw={redraw}
/>
);

Expand All @@ -71,7 +71,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
type="doughnut"
data={data as ChartData<'doughnut', number[], string>}
options={options as ChartOptions<'doughnut'>}
redraw={shouldRedraw}
redraw={redraw}
/>
);

Expand All @@ -82,7 +82,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
type="line"
data={data as ChartData<'line', DefaultDataPoint<'line'>, string>}
options={options as ChartOptions<'line'>}
redraw={shouldRedraw}
redraw={redraw}
/>
);
}
Expand Down

0 comments on commit 19e0eee

Please sign in to comment.