PDA

View Full Version : [CLOSED] Legend and Background do not appear



nizhelya
26 Apr 2012, 6:42 AM
Generated by Architect 2 (on may 04 2012) code do not work (Legend and background ) (Changing legend position do not fix the problem - tested). The code :
3488434885

If I edit it manually (in notepad etc., not in Architect 2) ( when I put the Legend and Gradient elements out of the InitComponent function) it works! This code is manually (notepad) corrected and working:
3488634887




Ext version tested:

Ext 4.0.7
Ext 4.1


Browser versions tested against:

Firefox 11 (Linux)
Opera (latest)
Chrome (latest)


Description:

Chart Legend and Background do not appear



Steps to reproduce the problem:

Create the chart with the legend in Architect!! The same with background.


The result that was expected:

Expected that the Legend will be visible. And the background feature will work.


The result that occurs instead:

Legend is not visible. Background does not work too!!!


Test Case: (see screenshots, there is a standart Architect generated code there(fig.1))

Debugging already done:

hand rewriting works


Possible fix:

Test the product.


Additional CSS used:

default ext-all.css
additional CSS but it shall not affect the chart


Operating System:

Linux Ubuntu

Phil.Strong
26 Apr 2012, 8:01 AM
A little more information next time can help but let me tell you what I think is happening.

1st are you using Designer 2 (old) or Architect 2 (new)?
2nd it appears that the second screen shot your posting is the code generated by Architect?

I also can't get this to work but charts are very fickle so if one thing is off it will refuse to render. The legend does work for me however in order to see it I must set a width and height on the chart. Width being greater than the left you have : 500

nizhelya
4 May 2012, 12:31 AM
Thanks, Phil!

1) As I have the internet and the Architect updates automatically - so my product version is Sencha Architect Version 2.0.0. Build 412.

2) I`ve corrected my post to make it more clear. The second code is handwritten in Notepad. More precisely, it is the edited code previously generated by Architect.

3) I tried to play with coordinates ... No effect.

This situation is really surprising, because the Architect is a commercial product, and at least the declared features are supposed to work ... IMHO

Still waiting for help.

dale.kort@str8lines.com
27 May 2013, 7:50 AM
Unfortunately found this thread after doing my own debugging and found the same results using the same results as before. It appears the previous post has been updated w/ the required information/syntax but I can provide additional details as well from my own use case if required.


Architect Information
Version: 2.2.2 Build: 991
Release Channel: 2.2.2-stable

jminnick
29 May 2013, 5:51 AM
Unfortunately found this thread after doing my own debugging and found the same results using the same results as before. It appears the previous post has been updated w/ the required information/syntax but I can provide additional details as well from my own use case if required.


Architect Information
Version: 2.2.2 Build: 991
Release Channel: 2.2.2-stable



If you wrap your chart with a panel; meaning the chart becomes an item of the panel it should render as you expect. This is a workaround until we can pinpoint the rendering issue.

Like so (and i realize this is not the most elegant of solutions but if you're in a pinch it will get you by):



Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.panel.Panel',


height: 591,
width: 873,
layout: {
type: 'fit'
},
title: 'My Panel',


initComponent: function() {
var me = this;


Ext.applyIf(me, {
items: [
{
xtype: 'chart',
height: 472,
width: 683,
animate: true,
background: {
gradient: {
id: 'gradientId',
angle: 45,
stops: {
0: {
color: '#555'
},
100: {
color: '#ddd'
}
}
}
},
insetPadding: 20,
store: 'MyStore',
axes: [
{
type: 'Category',
fields: [
'name'
],
position: 'left',
title: 'Category Axis'
},
{
type: 'Numeric',
fields: [
'data1',
'data2',
'data3',
'data4',
'data5'
],
title: 'Numeric Axis',
position: 'bottom'
}
],
series: [
{
type: 'bar',
label: {
display: 'insideEnd',
field: 'y',
color: '#333',
'text-anchor': 'middle'
},
axis: 'bottom',
xField: 'name',
yField: [
'data1',
'data2',
'data3',
'data4',
'data5'
]
}
],
legend: {


}
}
]
});


me.callParent(arguments);
}


});

info@ferraresegroup.com
12 Sep 2013, 10:31 AM
Chart legend in Architect 2 don't' show.

In Architect chart show well with Legend, in Chrome legend not show.

info@ferraresegroup.com
12 Sep 2013, 2:35 PM
Solved!
In architect 2 when a chart is linked into panel or container, label don't show.
If u move the chart inside the panel or container all work fine.

It's another bug?
Luca

aconran
13 Sep 2013, 7:39 AM
Yup, sounds like a bug in the framework either due to initialization or not pulling from the proto.