style(usage): tune shared bar/pie charts for the usage views
- bar-chart: barMinWidth so hour-granularity bars stay visible with gaps. - pie-chart: single legend-beside-pie layout, value (percent%) tooltip, 2-decimal rounding for the Summary donut.
This commit is contained in:
@@ -100,7 +100,11 @@ const BarChart: React.FC<BarChartProps> = (props) => {
|
||||
data: processedData,
|
||||
type: 'bar',
|
||||
barMaxWidth: 20,
|
||||
barMinWidth: 8,
|
||||
// Keep a small floor only — a large barMinWidth would force wide bars
|
||||
// when there are many categories (e.g. hourly buckets), squeezing out
|
||||
// the category gap so bars look fused. A low floor lets barCategoryGap
|
||||
// win, so even dense hourly views keep visible gaps.
|
||||
barMinWidth: 2,
|
||||
barGap: '30%',
|
||||
barCategoryGap: '50%',
|
||||
...(stack === false || stack === undefined ? {} : { stack }),
|
||||
|
||||
Reference in New Issue
Block a user