Results 1 to 7 of 7

Thread: chart axes increment

    You found a bug! We've classified it as EXTJS-14792 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    23

    Default chart axes increment

    Hi,
    the increment in the axes object is not working inside Chart
    Code:
    var myDataTempStore = Ext.create('Ext.data.JsonStore', {
                fields: ['dateTimeVal', 'value' ],
                data: [
                    { dateTimeVal: 'Mon 05 Jan', value: 37 },
                    { dateTimeVal: 'Tue 06 Jan', value: 37.5 },
                    { dateTimeVal: 'Wed 07 Jan', value: 37.8 },
                    { dateTimeVal: 'Thu 08 Jan', value: 36.2 },
                    { dateTimeVal: 'Fri 09 Jan', value: 36.8 },
                    { dateTimeVal: 'Sat 10 Jan', value: 36.5 },
                    { dateTimeVal: 'Sun 11 Jan', value: 36.8 },
                    { dateTimeVal: 'Fri 16 Jan', value: 37.5 }
                ]
            });
             
            var tempChart = {
                xtype: 'cartesian',
                title: 'Temperature',
                store: myDataTempStore,
                axes: [{
                    type: 'numeric',
                    fields: 'value',
                    position: 'left',
                    grid: true,
                    minimum: 35,
                    maximum: 40,
                    increment: 1 // <=====  not working
                }, {
                    type: 'category',
                    fields: 'dateTimeVal',
                    position: 'bottom',
                    grid: true,
                    label: {
                        rotate: {
                            degrees: -45
                        }
                    }
                }],
                series: [{
                    type: 'line',
                    xField: 'dateTimeVal',
                    yField: 'value',
                    style: {
                        lineWidth: 3
                    },
                    marker: {
                        radius: 4
                    },
                    label: {
                        field: 'value',
                        display: 'over'
                    },
                    highlight: {
                        fillStyle: '#000',
                        radius: 5,
                        lineWidth: 2,
                        strokeStyle: '#fff'
                    },
                    tooltip: {
                        trackMouse: true,
                        style: 'background: #fff',
                        showDelay: 0,
                        dismissDelay: 0,
                        hideDelay: 0,
                        renderer: function(storeItem, item) {
                            this.setHtml(storeItem.get('dateTimeVal') + ': ' + storeItem.get('value'));
                        }
                    }
                }]            
            };
    what is the wrong in my code, so how to increment one one (35, 36, 37, 38 , ..) in the axes [red section only]
    not label on line
    and I don't want to increment [by default 0.5] (35.0, 35.5, 36.0 , 36.5, ...)
    temperature.png


    https://fiddle.sencha.com/#fiddle/9bs
    Attached Images Attached Images
    Last edited by Gary Schlosberg; 23 Aug 2014 at 8:42 AM. Reason: add test fiddle

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Looks like it's a bug. I'm going to move this to the Bugs forum and file it.

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2014
    Posts
    7

    Default

    Same problem in Ext JS 5.0.1.1255. My only workaround is to configure majorTickSteps to be equal to (maximum - minumum) / increment. Your example would work as expected with:
    Code:
    minimum: 35,
    maximum: 40,
    increment: 1,
    majorTickSteps: 5
    Of course, this only works if minimum and maximum are known ahead of time ... not always the case.

  5. #5

    Default

    I can confirm that this bug is still present in 6.0.2 at the moment. It seems that increment has no effect whatsoever on the graph axis.

  6. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    I've added 6.x to the bug ticket and bumped up the priority.

  7. #7
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    1

    Default Still seeing this Bug in Ext Js 6.2

    Quote Originally Posted by Gary Schlosberg View Post
    I've added 6.x to the bug ticket and bumped up the priority.
    Still seeing this Bug in Ext Js 6.2. Any update?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •