Results 1 to 2 of 2

Thread: MajorUnit Problèm

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    Tunis
    Posts
    2

    Default MajorUnit Problèm

    Hi every body ,
    in fact "majorUnit" attribute in Numeric axis doesn't any effect on my chart .
    Any solution plz

    var win = {
    width: 500,
    height: 800,
    title: 'Open Projects ',
    collapsible :false,
    items: {
    xtype: 'chart',
    id :'charttask',
    width: 500,
    height: 800,
    animate: true,
    theme : 'Category1',
    legend: {
    position: 'bottom'
    },
    store: Taskstore,
    axes: [ {
    type :'Numeric',
    majorUnit: 30,
    position: 'left',
    fields: ['Workload', 'Realized', 'Estimation']

    },
    {
    type: 'Category',
    position: 'bottom',
    fields: ['Task'],
    label: {
    renderer :function (val){
    var part1 = val.substr(0,25);
    var s = Ext.String.format('{0}...', part1);
    return s;
    },
    rotate: {
    degrees: -90
    }
    },
    grid: true
    }],
    series: [{
    type: 'column',
    axis: 'left',
    smooth: true,
    fill: true,
    xField: 'Task',
    yField: 'Workload',
    tips: {
    trackMouse: true,
    width: 150,
    height: 100,
    renderer: function(storeItem, item) {
    this.setTitle(' '+storeItem.get('Task')+' Workload:'+' '+storeItem.get('Workload')+'days' );
    }},
    style: {
    fill: '#194885'
    }

    }, {
    type: 'line',
    axis: 'left',
    xField: 'Task',
    yField: 'Estimation',
    smooth: true,
    fill: true,
    fillOpacity: 0.9,
    style: {
    fill: '#E38D1E'
    },
    tips: {
    trackMouse: true,
    width: 150,
    height: 100,
    renderer: function(storeItem, item) {
    this.setTitle('Estimation: '+storeItem.get('Estimation')+'days' );
    }},
    markerCfg: {
    type: 'circle',
    size: 5
    }
    }, {
    type: 'line',
    axis: 'left',
    smooth: true,
    fill: true,
    fillOpacity: 0.4,
    xField: 'Task',
    yField: 'Realized',
    tips: {
    trackMouse: true,
    width: 150,
    height: 100,
    renderer: function(storeItem, item) {
    this.setTitle('Realized: '+storeItem.get('Realized')+'days' );
    }},
    markerCfg: {
    type: 'cross',
    size: 3
    }
    }]
    }}

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    168

    Default

    Hi,

    Thanks for you message. The majorUnit param was there to keep with the legacy API but now has no effect to the chart. We pushed a small API change that should solve your problem. By using "maximum", "minimum" and "majorTickSteps" you can customize the grid and lines exactly as you want.

    All values between maximum and minimum will be displayed and the number of lines/ticks in the axis will correspond to majorTickSteps.

    I hope this helps,

Similar Threads

  1. Dynamically changing majorUnit scale factor on a rendered chart
    By ronotica in forum Ext 3.x: Help & Discussion
    Replies: 22
    Last Post: 4 Mar 2012, 1:33 AM
  2. [PROBLEM] I Have a problem with Grid Pagination, he dont show the icons =/
    By GabrielCardelli in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 18 Mar 2010, 5:04 AM

Posting Permissions

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