how can i make the chart fit the parent element? So that Every Tick i specified in axes.x.ticker is visible. Not just when i pan. I want the whole thing resized to the parent element.
I cannot find an option for this.
My config's options:
{
colors: getColors(),
includeZero: true,
connectSeparatedPoints: true,
axes: {
x: {
ticker(min, max, pixels, opts, dygraph, vals) {
let ticks = [];
ticks.push({
v: new Date('2009-07-12 00:00:00').getTime(),
label: '00:00:00'
});
ticks.push({
v: new Date('2009-07-12 01:00:00').getTime(),
label: '01:00:00'
});
ticks.push({
v: new Date('2009-07-12 02:00:00').getTime(),
label: '02:00:00'
});
ticks.push({
v: new Date('2009-07-12 03:00:00').getTime(),
label: '03:00:00'
});
ticks.push({
v: new Date('2009-07-12 04:00:00').getTime(),
label: '04:00:00'
});
ticks.push({
v: new Date('2009-07-12 05:00:00').getTime(),
label: '05:00:00'
});
ticks.push({
v: new Date('2009-07-12 06:00:00').getTime(),
label: '06:00:00'
});
ticks.push({
v: new Date('2009-07-12 09:00:00').getTime(),
label: '09:00:00'
});
ticks.push({
v: new Date('2009-07-12 11:00:00').getTime(),
label: '11:00:00'
});
return ticks;
}
}
},
legend: 'follow',
legendFormatter: tooltipFormatter,
},