Warehouse racks
Racks seen from the aisle, each bin filled as much as it is. Good for stock, storage space and picking.
The smallest code that works. change the code, then press Run
In your framework
import { Chart } from 'nervure/react';
const spec = {
type: 'warehouse',
racks: [
{
name: 'Rack A',
levels: [
[
0.43333333333333335, 0.5333333333333333, 0.12222222222222222, 0.5888888888888889,
0.25555555555555554,
],
[0.2, 0.022222222222222223, 0, 0.2222222222222222, 0.7111111111111111],
[null, 0.4888888888888889, 0.7, 0.32222222222222224, 0.7444444444444445],
[0.3888888888888889, 0.044444444444444446, 0.2, 0.6777777777777778, 0.24444444444444444],
],
},
{
name: 'Rack B',
levels: [
[
0.8222222222222222, 0.5222222222222223, 0.36666666666666664, 0.3888888888888889,
0.26666666666666666,
],
[0.26666666666666666, null, 0.6888888888888889, 0.4666666666666667, 0.1],
[0.4777777777777778, 0.5666666666666667, 0.32222222222222224, 0.5111111111111111, 0.7],
[0.23333333333333334, 0.2222222222222222, 0.4666666666666667, 0.1, 0.6111111111111112],
],
},
{
name: 'Rack C',
levels: [
[1, 0.15555555555555556, 0.5666666666666667, 0.7777777777777778, 0.32222222222222224],
[
0.37777777777777777, 0.2777777777777778, 0.7555555555555555, 0.7777777777777778,
0.06666666666666667,
],
[
0.5222222222222223, 0.43333333333333335, 0.26666666666666666, 0.4666666666666667,
0.7888888888888889,
],
[
0.3888888888888889, 0.14444444444444443, 0.4888888888888889, 0.05555555555555555,
0.4777777777777778,
],
],
},
{
name: 'Rack D',
levels: [
[0.8, 0.06666666666666667, 0.6111111111111112, 0.18888888888888888, 1],
[
0.15555555555555556, 0.9222222222222223, 0.6222222222222222, 0.5444444444444444,
0.28888888888888886,
],
[0.8111111111111111, 0.2, 0.3, 0.12222222222222222, 0.044444444444444446],
[0.43333333333333335, 0.34444444444444444, 0.6333333333333333, 0.4, 0.2111111111111111],
],
},
],
};
export default function Example() {
return <Chart spec={spec} style={{ height: 340 }} />;
}Or import this chart alone: what each import weighs.
Options
Beside the fields shared by every chart (title, format, heading, export…), type warehouse takes:
/** Warehouse racks seen from the aisle: how full each bin is. */
interface WarehouseSpec extends Base {
type: 'warehouse';
racks: Rack[];
/** Called with `rack-level-bay`, from 1. */
onItemClick?: (id: string) => void;
}
interface Rack {
name: string;Style it
- Colours:
theme.palette,chart.setColor(name, colour), or--nervure-palettein your CSS. More - Marks:
[data-series="name"], parts:[data-part="axes"],legend,series. What you change is kept in exports. - Movement:
animation: falsedraws at once. More - Files:
chart.download('png'),svg,csv. More