0
votes

Can someone help me? I can use extjs to make a chart but now i don't know how to do like i want. So, i build a scatter chart and want to use fixed numeric x and y axis, from 0 to 5, the chart i had now just automatically decide the range value of my numeric axis based by the value from my store, i don't want that.

Ext.create('Ext.chart.Chart', {
renderTo: myChart,
width: 500,
height: 300,
animate: true,
theme:'Category1',
store: store,
axes: [{
    type: 'Numeric',
    position: 'left',
    title: 'Kepentingan',
    grid: true,
    minimum: 0
}, {
    type: 'Numeric',
    position: 'bottom',
    title: 'Kinerja',
    grid: true,
    minimum: 0
}],
series: [ {
    type: 'scatter',
    markerConfig: {
        radius: 5,
        size: 5
    },
    axis: 'left',
    xField: 'data2',
    yField: 'data3'
}]
});

What should i change in the axes part of my chart? Please help. Thank you in advanced for help.

1

1 Answers

0
votes

Try adding a maximum property set to 5 inside your axes array (for both Ox and Oy). Demo link added just to see the result of maximum property for Oy axis.

Click me.

axes: [{
         type: 'Numeric',
         position: 'left',
         title: 'Kepentingan',
         grid: true,
         minimum: 0,
         maximum: 5
    },
    {
        type: 'Numeric',
        position: 'bottom',
        title: 'Kinerja',
        grid: true,
        minimum: 0,
        maximum: 5
    }]