Skip to content

Commit 19c76ff

Browse files
committed
readme
1 parent 72dccca commit 19c76ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const MyChart = () => {
6161
ref={chartRef}
6262
data={data}
6363
options={options}
64-
style={{ width: 500, height: 200 }}
64+
style={{ width: 500, height: 200, backgroundColor: 'white' }}
6565
/>
6666
);
6767
};
@@ -76,6 +76,10 @@ The `ref` exposes the following methods:
7676
- `setSize(width, height)`: Set the size of the chart.
7777
- `destroy()`: Destroy the chart instance.
7878
79+
### Setting dimensions
80+
81+
You can set the width and height either through the uPlot `options` or by passing a `style` prop to the `ChartUPlot` component. If you set both, the uPlot `options` will take precedence.
82+
7983
## Demo app
8084
8185
The `demo` folder contains an example Expo app that demonstrates how to use the library. You can run it by cloning the repository and running:

0 commit comments

Comments
 (0)