Skip to content

Bar chart

D3 API

Chart.Bar

js
import { Chart } from '@semcore/ui/d3-chart';
import { Chart } from '@semcore/ui/d3-chart';

BarChartProps

BaseChartProps<> & {...}
NameTypeDescription
groupKeystring
xScaleScaleBand<any> | ScaleTime<anyany>
yScaleScaleLinear<anyany>
type"stack" | "group"
trendRecord<[]>

Bar

js
import { Bar } from '@semcore/ui/d3-chart';
import { Bar } from '@semcore/ui/d3-chart';

BarProps

& {...}
NameTypeDescription
xstringField name from `data` array item for the XAxis
ystringField name from `data` array item for the YAxis
colorstringLine color
hidebooleanElement hide property
durationnumberAnimation duration in ms
rnumber | number[]Radius of curvature
hMinnumberMinimal height
onClick(data: {[key: string]:string | number}, event: ) => voidBar click handler
transparentbooleanEnables element transparency
maxBarSizenumberThe maximum width of each Bar

Released under the MIT License.

Released under the MIT License.