May 05, 2014, 7:17 PM
[CLOSED] Stacked Chart Legend with categories on more than one line
Hi:
I have a Chart that is a stacked bar graph. The legend using it's default is listing each category on the same line in the legend. How can I customize the legend so the categores reflect on two lines?
See screenshot:
I have a Chart that is a stacked bar graph. The legend using it's default is listing each category on the same line in the legend. How can I customize the legend so the categores reflect on two lines?
See screenshot:
<ext:Chart
ID="TcoAppSummaryStackedBar"
runat="server"
Shadow="true"
Animate="true" Flex="1">
<Store>
<ext:Store ID="TcoAppSummaryStackedBarStore" AutoLoad="true" runat="server">
<Proxy>
<ext:AjaxProxy Json="true" Url='<%#ApplicationStackedBarURL%>' AutoDataBind="true">
<ActionMethods Read="GET" />
<Headers>
<ext:Parameter Name="Accept" Value="application/json" />
<ext:Parameter Name="Content-Type" Value="application/json" />
</Headers>
<Reader>
<ext:JsonReader Root="" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="TcoAppSummaryStackedBarModel" runat="server">
<Fields>
<ext:ModelField Name="Backup" Type="Float" />
<ext:ModelField Name="DC" Type="Float" />
<ext:ModelField Name="File Transfer" Type="Float" />
<ext:ModelField Name="Groupware" Type="Float" />
<ext:ModelField Name="GTI Support" Type="Float" />
<ext:ModelField Name="IaaS" Type="Float" />
<ext:ModelField Name="Identity & Access Mgmt" Type="Float" />
<ext:ModelField Name="Mainframe Utilization" Type="Float" />
<ext:ModelField Name="Network" Type="Float" />
<ext:ModelField Name="PaaS" Type="Float" />
<ext:ModelField Name="Sheduled Jobs" Type="Float" />
<ext:ModelField Name="Software" Type="Float" />
<ext:ModelField Name="Storage" Type="Float" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis Fields="Backup,DC,File Transfer,Groupware,GTI Support,Identity & Access Mgmt,Mainframe Utilization,Network,PaaS,Sheduled Jobs,Software,Storage"
Position="Bottom" Grid="true">
<Label>
<Renderer Fn="Ext.util.Format.numberRenderer('$0,000')" />
</Label>
</ext:NumericAxis>
<ext:CategoryAxis Fields="ROW" Position="Left" >
<Label>
<Renderer Handler="return ''" />
</Label>
</ext:CategoryAxis>
</Axes>
<Series>
<ext:BarSeries
Axis="Bottom"
Gutter="80"
XField="ROW"
YField="Backup,DC,File Transfer,Groupware,GTI Support,Identity & Access Mgmt,Mainframe Utilization,Network,PaaS,Sheduled Jobs,Software,Storage"
Stacked="true">
<%-- <Label Font="bold 8px Arial" Display="InsideEnd" Color="#000000"
Field="Backup,DC,File Transfer,Groupware,GTI Support,Identity & Access Mgmt,Mainframe Utilization,Network,PaaS,Sheduled Jobs,Software,Storage" >
<Renderer Handler="return String(item.yField);" />
</Label>--%>
<Tips TrackMouse="true" Width="150" Height="33">
<Renderer Handler="this.setTitle(String(item.yField) + '<br/>' + getCurrency(storeItem.get(String(item.yField))));" />
</Tips>
</ext:BarSeries>
</Series>
<LegendConfig Position="Bottom" LabelFont="8px Arial" />
</ext:Chart>
Last edited by Daniil; May 13, 2014 at 4:14 PM.
Reason: [CLOSED]