I have a multi-column chart with data values "d1-dn" and I have names to go with those, but those names are user entered text that can include ' and other interesting characters, so it doesn't seem wise to use those as the field names.
What I can't seem to find is a way to replace the yField values when the legend is being drawn. It appears this isn't possible without modifying LegendItem.js
Seems like either the series needs a getLegendTitleText or the legend needs a method getItemText method that would allow translation from data element name, to user readable name.Code:function getSeriesProp(name) { var val = series[name]; return (Ext.isArray(val) ? val[idx] : val); } label = me.add('label', surface.add({ type: 'text', x: 20, y: 0, zIndex: (z || 0) + 2, fill: legend.labelColor, font: legend.labelFont, text: getSeriesProp('title') || getSeriesProp('yField'), style: { 'cursor': 'pointer' } }));
This is on extjs4.1