Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53a9ed015a |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cameleer/design-system",
|
||||
"version": "0.1.47",
|
||||
"version": "0.1.48",
|
||||
"type": "module",
|
||||
"main": "./dist/index.es.js",
|
||||
"module": "./dist/index.es.js",
|
||||
|
||||
@@ -36,6 +36,12 @@ export function ThemedChart({
|
||||
return null
|
||||
}
|
||||
|
||||
// Show ~5-6 ticks max to avoid label overlap
|
||||
const maxTicks = 6
|
||||
const tickInterval = data.length > maxTicks
|
||||
? Math.ceil(data.length / maxTicks) - 1
|
||||
: 0
|
||||
|
||||
return (
|
||||
<div className={className} style={{ width: '100%', height }}>
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
@@ -46,6 +52,8 @@ export function ThemedChart({
|
||||
type={xType}
|
||||
{...rechartsTheme.xAxis}
|
||||
tickFormatter={xTickFormatter}
|
||||
interval={tickInterval}
|
||||
minTickGap={40}
|
||||
/>
|
||||
<YAxis
|
||||
{...rechartsTheme.yAxis}
|
||||
|
||||
Reference in New Issue
Block a user