Skip to content

Commit

Permalink
Import SDK charts
Browse files Browse the repository at this point in the history
  • Loading branch information
drx committed Aug 8, 2024
1 parent 17b5eba commit ebc7c07
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
9 changes: 9 additions & 0 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"webpack-dev-server": "^4.15.1"
},
"dependencies": {
"@canvas-sdk/charts": "^0.5.3",
"@headlessui/react": "^2.0.4",
"chroma-js": "^2.4.2",
"dompurify": "^3.1.0",
Expand Down
7 changes: 2 additions & 5 deletions react/src/SvgChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import React, { ReactElement, RefObject, useEffect, useLayoutEffect, useRef, use
import { ChartData } from 'src/__rust_generated__/ChartData';
import { HorizontalXAxis, HorizontalYAxis, XAxis, YAxis } from 'src/charts/Axis';
import { HorizontalGrid } from 'src/charts/HorizontalGrid';
import { LineChart } from 'src/charts/LineChart';
import { LineChart } from '@canvas-sdk/charts';
import { categoricalScale, dateTimeScale, linearScale, logarithmicScale } from '@canvas-sdk/charts/scale';
import { VerticalBarChart } from 'src/charts/VerticalBarChart';
import { categoricalScale } from 'src/charts/scale/categorical';
import { dateTimeScale } from 'src/charts/scale/datetime';
import { linearScale } from 'src/charts/scale/linear';
import { logarithmicScale } from 'src/charts/scale/logarithmic';
import { parseDateTimeNtz } from 'src/util/DateUtil';
import { DateTime } from 'luxon';
import { ChartTheme } from './ChartTheme';
Expand Down
2 changes: 1 addition & 1 deletion react/src/charts/HorizontalGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function HorizontalGrid({
x2={xEnd}
y1={y}
y2={y}
className={point === 0 ? 'stroke-default' : 'stroke-divider'}
className={point === 0 ? 'stroke-default' : 'stroke-[var(--chart-grid,#E3E3E5)]'}
/>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion react/src/charts/VerticalGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function VerticalGrid({
y2={yEnd}
x1={x}
x2={x}
className={point === 0 ? 'stroke-default' : 'stroke-divider'}
className={point === 0 ? 'stroke-default' : 'stroke-[var(--chart-grid,#E3E3E5)]'}
/>
);
})}
Expand Down

0 comments on commit ebc7c07

Please sign in to comment.