Results 1 to 3 of 3

Thread: Getting inifinity bar height/width in vertical/horizontal bar chart

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Karlsruhe, Germany
    Posts
    21
    Answers
    2
    Vote Rating
    0
      0  

    Question Getting inifinity bar height/width in vertical/horizontal bar chart

    Hey guys,

    I stumpled over an error which I cannot debug, because it's only a 'warning'. So I hope someone could help me.

    I created a chart with bar series and added a store to it, all rendered fine. The only mistake that my bar series have, is that the x value of the bar series is 'infinity' (in vertical label orientation). This results in drawed chart with all the bars along the y axis.


    Warnings in Firebug:
    ! Unexpected value Infinity parsing the attribute width.
    return Function.prototype....ctor.apply(Function.prototype, args); ext-all-debug.js (Line 400)
    ! Unexpected value Infinity parsing the attribute width.
    ! Unexpected value Infinity parsing the attribute x.

    The warnings in Firebug are translated by me, so it can differ to the original english translation of firebug.

    My code for the chart:

    Code:
    Ext.create('Ext.chart.Chart', {
    	width: 1050,
    	height: 370,
    	animate: true,
    	theme: 'Red',
    	store: Ext.getStore('myStore'),
    	axes: [{
    		type: 'Category',
    		position: 'bottom',
    		fields: ['day'],
    		title: 'Last 10 days'
    	}, {
    		type: 'Numeric',
    		position: 'left',
    		fields: ['count'],
    		title: 'Login Count',
    		grid: true
    	}],
    	//Add Bar series.
    	series: [{
    		type: 'bar',
    		axis: 'bottom',
    		xField: 'day',
    		yField: 'count',
    		highlight: true,
    		label: {
    		     display: 'insideEnd',
    		     field: 'count',
    		     orientation: 'vertical',
    		     color: '#333',
    		     'text-anchor': 'middle'
    		}
    	}]
    });
    Many thanks in advance!
    Last edited by silent; 27 Oct 2011 at 10:38 PM. Reason: Missing code

  2. #2
    Sencha User
    Join Date
    Jun 2009
    Posts
    7
    Vote Rating
    0
      0  

    Default

    Hi,

    have the same issue, did you get it working?

    Regards

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    7
    Vote Rating
    0
      0  

    Default

    Ok, figuered out what was not working:

    I use YAML CSS framework. In file base.css (YAML core file) there is a declaration
    Code:
    /* (en) HTML5 - add missing styling in IE & old FF for hidden attribute  */
    /* (de) HTML5 - Eigenschaften fr das hidden-Attribut in lteren IEs und FF nachrsten */
         [hidden] { 
             display: none; 
         }
    This declaration causes the ExtJS parsing errors. Commenting that declaration is enough.

Tags for this Thread

Posting Permissions

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