Skip to content

Commit

Permalink
fix: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
s0ftik3 committed May 16, 2023
1 parent 0473837 commit 53eed0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ function MyChart() {
| Prop | Description | Type |
|-------------|------------------------------------------------|---------|
| width | The width of the chart canvas in pixels. | number \| undefined |
| height | The height of the chart canvas in pixels. | number \ | undefined |
| height | The height of the chart canvas in pixels. | number \| undefined |
| fallback | A fallback element to display when chart fails. | JSX.Element |
| type | The type of the chart. | keyof [ChartTypeRegistry](https://www.chartjs.org/docs/latest/api/interfaces/ChartTypeRegistry.html) |
| data | The chart data object. | [ChartData](https://www.chartjs.org/docs/latest/api/interfaces/ChartData.html) \ | undefined |
| options | The chart options object. | [ChartOptions](https://www.chartjs.org/docs/latest/api/interfaces/CoreChartOptions.html) \ | undefined |
| data | The chart data object. | [ChartData](https://www.chartjs.org/docs/latest/api/interfaces/ChartData.html) \| undefined |
| options | The chart options object. | [ChartOptions](https://www.chartjs.org/docs/latest/api/interfaces/CoreChartOptions.html) \| undefined |

## Examples
Check out `/dev` folder and run the SolidJs application to see how it works.
Expand Down
3 changes: 2 additions & 1 deletion src/chart.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Chart, { ChartData, ChartItem } from 'chart.js/auto'
import Chart, { ChartData, ChartItem, ChartOptions } from 'chart.js/auto'
import { createEffect, mergeProps, on, onCleanup, onMount } from 'solid-js'
import { unwrap } from 'solid-js/store'
import { ChartJsProps } from './types'
Expand All @@ -13,6 +13,7 @@ export default function ChartJs(props: ChartJsProps) {
height: 512,
type: 'line',
data: {} as ChartData,
options: { responsive: true } as ChartOptions,
},
props
)
Expand Down

0 comments on commit 53eed0d

Please sign in to comment.