I need to show 127 bars but ChartJs display only 6 labels and all bars. How to increase bar height and make it more readable? I can't set fixed height to canvas because the chart can draw 1, 10, or 150 bars, it depends on received data. Sandbox: https://codesandbox.io/s/damp-smoke-4myvw?file=/App.tsx
Asked
Active
Viewed 63 times
1 Answers
0
A possible solution would be to add the height
prop to the chart:
const BAR_HEIGHT = 23;
export function App() {
return <Bar options={options} data={data} height={BAR_HEIGHT * data.labels.length} />;
}

tcconstantin
- 369
- 1
- 4