[CLOSED] How to change background color of labels in chart

  1. #1

    [CLOSED] How to change background color of labels in chart

    Is it possible to change background color for all labels of axis in the chart?
    Last edited by Daniil; May 21, 2013 at 3:44 AM. Reason: [CLOSED]
  2. #2
    Hello!

    If you want to change background color of each axis label it's not possible because label is inline element. But maybe I misunderstood you.
  3. #3
    Quote Originally Posted by Baidaly View Post
    Hello!

    If you want to change background color of each axis label it's not possible because label is inline element. But maybe I misunderstood you.
    Hello, It is possible using sprites. You can do rectangles behind the label. It doesn't work if your chat resizable. You can close the topic
  4. #4
    Let me know if I can do something like done on the image attached without sprites?
      <ext:Chart ID="crtProgress" runat="server" Shadow="false" Animate="true"
                                                Store="strGoals" Height="225" Cls="lhapp-chart">
                                                <Items>
                                                   <ext:Sprite Type="Rect" X="8" Y="0" Width="15" Height="210" Fill="#808080"></ext:Sprite>
                                                   <ext:Sprite Type="Rect" X="8" Y="200" Width="320" Height="15" Fill="#808080"></ext:Sprite>
                                                   <ext:Sprite Text="week" Type="Text" X="250" Y="210" Fill="#fff" Font="11px Arial"></ext:Sprite>
                                                   <ext:Sprite Text="steps" Type="Text" X="-25" Y="-2" Fill="#fff" Font="11px Arial">
                                                       <Rotate Degrees="270"></Rotate>
                                                   </ext:Sprite>
                                                </Items>
                                                <Axes>
                                                    <ext:NumericAxis Position="Left" Grid="false" Minimum="0" Maximum="1" DashSize="0">
                                                        <Label Padding="0" Fill="#fff" Font="11px Arial" Width="10">
                                                            <Rotate Degrees="270"></Rotate>
                                                            <Renderer Handler="return verticalAxisRenderer(value);" />
                                                        </Label>
                                                    </ext:NumericAxis>
                                                    <ext:CategoryAxis Fields="shortName" Position="Bottom" DashSize="1" >
                                                        <Label Padding="0" Fill="#fff" Font="11px Arial">
                                                        </Label>
                                                    </ext:CategoryAxis>
                                                </Axes>
                                                <Series>
                                                    <ext:ColumnSeries Axis="Bottom" XField="name" YField="value">
                                                        <Renderer Fn="columnRenderer"></Renderer>
                                                    </ext:ColumnSeries>
                                                </Series>
                                            </ext:Chart>
    Attached Thumbnails Click image for larger version. 

Name:	Capture.PNG 
Views:	18 
Size:	2.0 KB 
ID:	6220  
  5. #5
    I think it's reasonable solution in this case because Charts have many limitations like this one.

    But I'll ask my colleagues maybe they can offer something else.
  6. #6
    Hi,

    I can confirm that there is no a built-in possibility to fill background as you need. So, your solution with Sprites looks the only solution to achieve it.

Similar Threads

  1. [CLOSED] Chart.Legend background color ?
    By Zenalyse in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 19, 2013, 1:57 PM
  2. [CLOSED] How to change a ext:menu's background color?
    By Fahd in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 15, 2013, 4:01 AM
  3. [CLOSED] Change TreePanel background color and toolbar color
    By jchau in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 07, 2012, 4:42 PM
  4. Replies: 12
    Last Post: Jun 17, 2009, 12:07 PM
  5. Change Tab background color or background image
    By georgelanes in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 3:55 PM

Posting Permissions