Hi,
We are using a graduated panel to render a scale. And we want to bind the value of graduatedMin
, graduatedMax
to outside values.
This is the config we have currently.
const model = goMake(go.Model);
model.setDataProperty(model.modelData, 'min', 5);
const diagram = goMake(go.Diagram, {
model,
});
diagram.add(
goMake(
go.Part,
go.Panel.Graduated, // or "Graduated"
new go.Binding('graduatedMin', 'min').ofModel(),
goMake(go.Shape, { geometryString: 'M0 0 H400' }), // the main shape, a horizontal line
goMake(go.Shape, { geometryString: 'M0 0 V10' }), // a tick mark, a vertical line
goMake(go.TextBlock, { interval: 1 })
)
);
diagram.div = divRef.current;
console.log(diagram.model.modelData); // { min: 5 }
After this config; we are still seeing the scale start from 1.