Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a checkbox to hide or show labels in a ExtJS 4 Chart
    primarykey
    data
    text
    <p>I've created a chart as the code below, and a also have a checkbox with a handler function that I want to show or hide the chart labels depending on its status. My question is, how do I make the labels hidden without also hiding the actual chart values?</p> <pre><code>// checkbox handler code handler: function() { if(Ext.getCmp('chk_showLabels').getValue()) { // function to show labels here } else { // function to hide labels here } } // Chart code { xtype : 'chart', animate : true, id : 'chart', width : 996, height : 432, shadow : false, store : volumes, theme : 'Category1', axes : [{ type : 'Numeric', position : 'right', fields : ['participacao'], title : 'Percentual', label : { renderer : Ext.util.Format.numberRenderer('0.00%') } }, { type : 'Numeric', position : 'left', grid : true, fields : ['volume'], title : 'Volume', label : { renderer : Ext.util.Format.numberRenderer('0./i') } }, { type : 'Category', position : 'bottom', fields : ['data'], label : { rotate : { degrees : 270 } } } ], series : [{ type : 'column', axis : 'right', xField : 'data', yField : ['participacao'] }, { type : 'line', axis : 'right', xField : 'data', yField : ['participacao'], smooth : true, fill : true, style : { opacity : .1 }, label : { renderer : Ext.util.Format.numberRenderer('0./i') }, markerConfig : { type : 'circle', size : 5 }, tips : { trackMouse : true, width : 148, height : 36, renderer : function (storeItem, item) { this.setTitle('Participação: ' + Ext.util.Format.number(storeItem.get('participacao'), "0.00") + '% \n Volume: ' + storeItem.get('volume')); } } } ] } </code></pre> <p>Thanks a lot</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload