PDA

View Full Version : [FIXED] ExtJS 4 Series Title as Array



ottobar
18 Apr 2012, 7:15 AM
In code, it is possible to configure the title as an array in order to customize what gets displayed in the legend for a series. For example (from http://www.sencha.com/forum/showthread.php?136068-ExtJS-4-Charts-Custom-Legends):



series: [{
yField: ['data1', 'data2'],
title: ['Title 1', 'Title 2']
}]


However, I am not able to do this with Architect version 2.0.0 build 410. It only accepts a string for the title property value (Ext.chart.series.Series).

abarash
16 Aug 2012, 3:36 PM
Bump. :D

rbraddy
19 Aug 2012, 3:35 PM
Agree. Bump. Using title to set the labels of legend array doesn't work (in Sencha Arcitect or ExtJS 4.1.1)

I see there's a "we found a bug" note at the top of this post... is there a workaround??

rustedroof
24 Aug 2012, 6:47 AM
The note says it was fixed at the top of the thread, but that doesn't appear to be the case at all. I'm running SA 2.1.0, Build 588, and Title is still just a string. I tried to edit the .js in an outside editor, defining my array, then re-open the project in SA 2.1.0 and it just obliterated the property.

It appears my only workaround is to use setTitle and write some hackery code to get around this bug in SA.

Anyone figure out a more elegant work around?

aconran
24 Aug 2012, 7:14 AM
This is fixed in build 589+ (not yet released to the public).

Using setTitle in an override or event handler is the easiest way to work around this at the moment.

rustedroof
24 Aug 2012, 7:17 AM
This is fixed in build 589+ (not yet released to the public).

Using setTitle in an override or event handler is the easiest way to work around this at the moment.

Thanks for the update, Aaron.