(extra = {})
| 164 | |
| 165 | /** A value axis: hairline grid, clean ticks, always anchored at zero. */ |
| 166 | export function valueScale(extra = {}) { |
| 167 | return scale( |
| 168 | { |
| 169 | beginAtZero: true, |
| 170 | border: { color: AXIS }, |
| 171 | grid: { color: GRID, drawTicks: false }, |
| 172 | ticks: { color: MUTED, padding: 8, maxTicksLimit: 6, precision: 0 }, |
| 173 | }, |
| 174 | extra, |
| 175 | ); |
| 176 | } |
| 177 | |
| 178 | /** A category or time axis: no grid at all, so the marks carry the chart. */ |
| 179 | export function categoryScale(extra = {}) { |