[CLOSED] Legend color problem on pi3D chart with custom color

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Legend color problem on pi3D chart with custom color

    Hello

    Here the test code:
    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="System.Drawing" %>
    <%@ Import Namespace="System.IO" %>
    
    <script runat="server">
        protected void DataSet1(object sender, DirectEventArgs e)
        {
            this.chartTop10Country.GetStore().DataSource = this.DS1;
            this.chartTop10Country.GetStore().DataBind();
            this.chartTop10Country.Call("refreshLegendStore");
        }
    
        protected void DataSet2(object sender, DirectEventArgs e)
        {
            this.chartTop10Country.GetStore().DataSource = this.DS2;
            this.chartTop10Country.GetStore().DataBind();
            this.chartTop10Country.Call("refreshLegendStore");
        }
    
    
        private object[] DS1
        {
            get
            {
                return new object[]
                {
                    new object[] { "A", 71.72 },
                    new object[] { "B", 29.01 },
                    new object[] { "C", 83.81 },
                    new object[] { "D", 52.55 }
                };
            }
        }
    
        private object[] DS2
        {
            get
            {
                return new object[]
                {
                    new object[] { "E", 30 },
                    new object[] { "F", 45 },
                    new object[] { "G", 25 },
                    new object[] { "H", 10 }
                };
            }
        }
    
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title></title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <h1>Refresh legend sample</h1>
    
            <ext:Panel
                runat="server"
                Title="Area Chart"
                Width="800"
                Height="600"
                Layout="FitLayout">
                <TopBar>
                    <ext:Toolbar runat="server">
                        <Items>
                            <ext:ToolbarFill runat="server" />
    
                            <ext:Button
                                runat="server"
                                Text="Dataset 1"
                                Icon="ArrowRefresh"
                                OnDirectClick="DataSet1" />
                            <ext:Button
                                runat="server"
                                Text="DataSet 2"
                                Icon="ArrowRefresh"
                                OnDirectClick="DataSet2" />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:PolarChart
                        ID="chartTop10Country"
                        runat="server"
                        Shadow="true"
                        InsetPadding="60"
                        InnerPadding="20">
                        <LegendSpriteConfig runat="server" />
                        <Store>
                            <ext:Store
                                runat="server"
                                AutoDataBind="true">
                                <Model>
                                    <ext:Model runat="server">
                                        <Fields>
                                            <ext:ModelField Name="Country" />
                                            <ext:ModelField Name="Created" />
                                        </Fields>
                                    </ext:Model>
                                </Model>
                            </ext:Store>
                        </Store>
                        <Interactions>
                            <ext:ItemHighlightInteraction />
                            <ext:RotateInteraction />
                        </Interactions>
                        <Series>
                            <ext:Pie3DSeries
                                AngleField="Created"
                                ShowInLegend="true"
                                Colors="#00FFFF,#2BFFD4,#55FFAA,#80FF7F"
                                Donut="30">
                                <Label Field="Country" Display="Rotate" FontSize="18" FontFamily="Arial" />
                            </ext:Pie3DSeries>
                        </Series>
                    </ext:PolarChart>
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
    as you can see, colors are not shown in the legend.
    Last edited by fabricio.murta; Jul 17, 2017 at 5:29 PM.

Similar Threads

  1. [CLOSED] Increase the height of legend, Change line color of chart
    By praveencat123 in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 26, 2015, 2:26 PM
  2. Replies: 2
    Last Post: Jul 23, 2014, 1:02 PM
  3. [CLOSED] problem line color into the chart for different browser
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 19, 2013, 6:50 PM
  4. [CLOSED] Chart.Legend background color ?
    By Zenalyse in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 19, 2013, 1:57 PM
  5. [CLOSED] Is there any way we can give custom legend label in chart
    By advBackOffice in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 05, 2012, 4:15 PM

Posting Permissions