- {/** BAR */}
-
-
Bar chart
-
- `x: ${datum.x}`}
- tabIndex={({ index }) => assignIndexValue(index, 1)}
- />
- }
- />
-
-
-
- {/** BOXPLOT */}
-
-
BoxPlot
-
- `${datum.x} max is ${datum._max}`}
- tabIndex={({ index }) => assignIndexValue(index, 5)}
- />
- }
- q3Component={
-
- `${datum.x} q3 value is ${datum._q3}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 6.1)}
- />
- }
- medianComponent={
-
- `${datum.x} median value is ${datum._median}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 5.1)}
- />
- }
- q1Component={
-
- `${datum.x} q1 value is ${datum._q1}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 6.2)}
- />
- }
- minComponent={
- `${datum.x} min is ${datum._min}`}
- tabIndex={({ index }) => assignIndexValue(index, 5.2)}
- />
- }
- />
-
-
-
- {/** AREA */}
-
-
Area
-
-
- }
- >
-
- `area chart stack ${data?.[0]._stack}`
- }
- tabIndex={20}
- />
- }
- />
-
- `area chart stack ${data?.[0]._stack}`
- }
- tabIndex={20.1}
- />
- }
- />
-
- `area chart stack ${data?.[0]._stack}`
- }
- tabIndex={20.2}
- />
- }
- />
-
- `area chart stack ${data?.[0]._stack}`
- }
- tabIndex={20.3}
- />
- }
- />
-
-
-
-
- {/** LINE */}
-
-
Line
-
- datum.y}
- labelComponent={
- datum.y}
- tabIndex={({ index }) => assignIndexValue(index, 21)}
- />
- }
- dataComponent={
-
- data
- ?.map(
- (dataPoint: any, i: number) =>
- `data point ${i + 1} x value is ${
- dataPoint.x
- } and y value is ${dataPoint.y}`,
- )
- .join("") || ""
- }
- />
- }
- />
-
-
-
- {/** PIE */}
-
-
Pie
- datum.radius - 12}
- width={400}
- height={250}
- radius={({ datum }) => datum.radius}
- data={accessibilityPieData}
- dataComponent={
- `pie slice ${datum.x}`}
- tabIndex={({ index }) => assignIndexValue(index, 30)}
- />
- }
- />
-
-
- {/** SCATTER */}
-
-
Scatter
-
-
- `scatter point x: ${datum.x}, y:${datum.y}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 28)}
- />
- }
- />
-
-
-
- {/** VORONOI */}
-
-
Voronoi
-
-
- `voronoi chart, x ${datum.x}, y ${datum.y}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 35)}
- />
- }
- />
-
-
-
- {/** CANDLESTICK */}
-
-
Candlestick
-
-
- `candlestick chart, ${datum.x} open ${datum.open}, close ${datum.close}, low ${datum.low}, high ${datum.high}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 43)}
- />
- }
- />
-
-
-
- {/** ERRORBAR */}
-
-
ErrorBar
-
- datum.error * datum.x}
- errorY={(datum) => datum.error * datum.y}
- dataComponent={
-
- `error bar chart, x ${datum.x}, y ${datum.y}, error margin ${datum.error}`
- }
- tabIndex={({ index }) => assignIndexValue(index, 60)}
- />
- }
- />
-
-
-
- {/** ACCESSIBLE GROUP */}
-
-
Accessible Group
-
-
- }
- >
-
-
- }
- />
-
-
-
-
-
- >
- );
- }
-}
diff --git a/demo/ts/components/draggable-demo.tsx b/demo/ts/components/draggable-demo.tsx
deleted file mode 100644
index 89b255ccd..000000000
--- a/demo/ts/components/draggable-demo.tsx
+++ /dev/null
@@ -1,286 +0,0 @@
-import React from "react";
-import { VictoryChart } from "victory-chart";
-import { VictoryAxis } from "victory-axis";
-import { VictoryBar } from "victory-bar";
-import { VictoryBrushLine } from "victory-brush-line";
-import { VictoryScatter } from "victory-scatter";
-import {
- DomainTuple,
- VictoryClipContainer,
- Point,
- Selection,
- VictoryTheme,
-} from "victory-core";
-import { VictoryZoomContainer } from "victory-zoom-container";
-import { VictoryBrushContainer } from "victory-brush-container";
-
-type BarDataType = {
- name: string;
- range: DomainTuple;
-};
-
-type PointDataType = {
- name: string;
- date: Date;
-};
-
-type ZoomDomainType = { x?: DomainTuple; y?: DomainTuple };
-
-interface DraggableDemoInterface {
- bars: BarDataType[];
- points: PointDataType[];
- zoomDomain: ZoomDomainType | undefined;
-}
-
-interface TargetPropsInterface {
- scale?: number;
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
- onPointChange?: Function;
- datum?: {};
-}
-
-const bars: BarDataType[] = [
- { name: "SEA", range: [new Date(2013, 1, 1), new Date(2019, 1, 1)] },
- { name: "HKG", range: [new Date(2015, 1, 1), new Date(2015, 5, 1)] },
- { name: "LHR", range: [new Date(2016, 5, 1), new Date(2019, 1, 1)] },
- { name: "DEN", range: [new Date(2018, 8, 1), new Date(2019, 1, 1)] },
-];
-
-const points: PointDataType[] = [
- { name: "SEA", date: new Date(2012, 9, 1) },
- { name: "HKG", date: new Date(2014, 3, 1) },
- { name: "LHR", date: new Date(2015, 6, 1) },
- { name: "DEN", date: new Date(2018, 3, 1) },
-];
-
-class DraggablePoint extends React.Component