0

I'm dealing with the latest ExtJS version and currently trying to add the latest value of a cartesian chart store to the y-Axis

see image

1

Is there an easy / built in way to achieve this?

Also is there a way to offset the label values since they get cut sometimes when set to

textAlign: 'right'

Thanks for your help!

This is the chart I already setup:

Ext.create({
    xtype: 'cartesian',
    id: `Chart_Times`,
    cls: 'chart-default',
    style: 'background: #fff',
    animation: false,
    store: {
        fields: ['Time', 'Value']
    },
    axes: [{
        type: 'numeric',
        position: 'right',
        grid: {
            stroke: '#000',
            lineWidth: 1
        },
        minimum: 0,
        label: {
            field: 'Value',
            textAlign: 'right',
            font: '11px Arial',
        },
    },
    {
        type: 'category',
        visibleRange: [0, 1],
        position: 'bottom',
        label: { font: '11px Arial' },
        style: { majorTickSize: 0, step: 100 },
        renderer: function (axis, label, layoutContext, lastLabel) {
            return Helper.CalculateTimePast(label);
        }
    }],

    series: [{
        type: 'line',
        xField: 'Time',
        yField: 'Value',
        title: 'Smooth'
    }],
})
enter code here
vimuth
  • 5,064
  • 33
  • 79
  • 116
drfraenk
  • 1
  • 2

0 Answers0