Skip to content
Open
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
5 changes: 1 addition & 4 deletions pages/03-core/simple-zooming.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import SpaceBetween from "@cloudscape-design/components/space-between";
import { colorChartsBlue1400, colorChartsLineTick } from "@cloudscape-design/design-tokens";

import { CoreChartProps } from "../../lib/components/core/interfaces";
import { InternalZoomProps } from "../../lib/components/core/internal-interfaces";
import CoreChart from "../../lib/components/internal-do-not-use/core-chart";
import { dateFormatter } from "../common/formatters";
import { PageSettings, PageSettingsForm, useChartSettings } from "../common/page-settings";
Expand All @@ -23,8 +22,6 @@ interface ThisPageSettings extends PageSettings {
keepZoomingFrame: boolean;
}

const ZoomCoreChart = CoreChart as React.ComponentType<CoreChartProps & InternalZoomProps>;

function randomInt(min: number, max: number) {
return min + Math.floor(pseudoRandom() * (max - min));
}
Expand Down Expand Up @@ -247,7 +244,7 @@ function Charts() {
}}
/>

<ZoomCoreChart
<CoreChart
callback={(chart) => {
scatterChartRef.current = chart;
}}
Expand Down
5 changes: 2 additions & 3 deletions pages/common/page-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Select from "@cloudscape-design/components/select";
import SpaceBetween from "@cloudscape-design/components/space-between";

import { CartesianChartProps, PieChartProps } from "../../lib/components";
import { InternalZoomProps } from "../../lib/components/core/internal-interfaces";
import { CoreChartProps } from "../../src/core/interfaces";
import { useHighcharts } from "./use-highcharts";

Expand Down Expand Up @@ -90,9 +89,9 @@ export function useChartSettings<SettingsType extends PageSettings = PageSetting
settings: SettingsType;
setSettings: (settings: Partial<SettingsType>) => void;
chartProps: {
cartesian: Omit<CartesianChartProps, "series"> & InternalZoomProps & { ref: React.Ref<CartesianChartProps.Ref> };
cartesian: Omit<CartesianChartProps, "series"> & { ref: React.Ref<CartesianChartProps.Ref> };
pie: Omit<PieChartProps, "series"> & { ref: React.Ref<PieChartProps.Ref> };
core: Omit<CoreChartProps, "series" | "options"> & InternalZoomProps;
core: Omit<CoreChartProps, "series" | "options">;
};
isEmpty: boolean;
} {
Expand Down
Loading
Loading