Skip to content

Commit

Permalink
new(demo/xychart): use AnimatedLineSeries
Browse files Browse the repository at this point in the history
  • Loading branch information
williaster committed Oct 15, 2020
1 parent 685cf01 commit 279bd2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/visx-demo/src/sandboxes/visx-xychart/Example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react';
import { CityTemperature } from '@visx/mock-data/lib/mocks/cityTemperature';
import {
AnimatedAxis,
AnimatedGrid,
DataProvider,
AnimatedBarGroup,
AnimatedBarSeries,
AnimatedBarStack,
LineSeries,
AnimatedGrid,
AnimatedLineSeries,
DataProvider,
Tooltip,
XYChart,
} from '@visx/xychart';
Expand Down Expand Up @@ -112,14 +112,14 @@ export default function Example({ height }: Props) {
)}
{renderLineSeries && (
<>
<LineSeries
<AnimatedLineSeries
dataKey="San Francisco"
data={renderBarStack ? data : data}
xAccessor={accessors.x['San Francisco']}
yAccessor={accessors.y['San Francisco']}
horizontal={!renderHorizontally}
/>
<LineSeries
<AnimatedLineSeries
dataKey="Austin"
data={renderBarStack ? data : data}
xAccessor={accessors.x.Austin}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type BaseBarGroupProps<XScale extends PositionScale, YScale extends Posit
padding?: number;
/** Comparator function to sort `dataKeys` within a bar group. By default the DOM rendering order of `BarGroup`s `children` is used. */
sortBars?: (dataKeyA: string, dataKeyB: string) => number;
/** Rendered component which is passed BarsProps by BaseBarSeries after processing. */
/** Rendered component which is passed BarsProps by BaseBarGroup after processing. */
BarsComponent: React.FC<BarsProps<XScale, YScale>>;
};

Expand Down

0 comments on commit 279bd2f

Please sign in to comment.