Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Pie Chart - how to customize legend text

  1. #1
    Ext User
    Join Date
    Dec 2009
    Posts
    4
    Vote Rating
    0
      0  

    Default Pie Chart - how to customize legend text

    Hello,

    I'm trying to customize the display text on the legend of a pie chart.

    The default legend will display the 'categoryField'.
    Is there anyway I can customize it so that it swill display 'categoryField . dataField'?

    Thanks.

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    86
      0  

    Default

    Look at the source of this example from CH9 of my book: http://extjsinaction.com/examples/ch..._PieChart.html

  3. #3
    Ext User
    Join Date
    Dec 2009
    Posts
    4
    Vote Rating
    0
      0  

    Default

    Hello Jay Garcia,

    Thanks a lot for the example.

    I can see from the code how you do the custom tiprenderer function.
    What I really need is to know how customize the legend text:

    e.g. 20,000's to 20,000's (42)

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    Write a legendRenderer instead of tipRenderer?

  5. #5
    Ext User
    Join Date
    Dec 2009
    Posts
    4
    Vote Rating
    0
      0  

    Default

    My question is, is there a legendRenderer item for the chart?
    I tried writing a legendRenderer function instead of tipRenderer, but it doesn't work.


    var pieChart = {
    xtype : 'piechart',
    id : 'empPieChart',
    store : pieStore,
    dataField : 'total',
    categoryField : 'range',
    tipRenderer : tipRenderer,
    legendRenderer : legendRenderer
    }

  6. #6
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89
    Vote Rating
    0
      0  

    Default

    Anyone figure this out yet? I had a request to add the totals to the category in the legend. I looked at the example cited, but couldn't see how that would alter the legend.
    Frank R.

  7. #7
    Ext User
    Join Date
    Apr 2009
    Posts
    12
    Vote Rating
    0
      0  

    Default

    I'm looking for a solution to this question as well...

  8. #8
    Ext User
    Join Date
    Dec 2009
    Posts
    4
    Vote Rating
    0
      0  

    Default

    Sadly I've given up on this. I've searched everywhere and I don't think that it is possible.
    Well if you do find the solution please post it here.

  9. #9
    Ext User
    Join Date
    Aug 2010
    Posts
    10
    Vote Rating
    0
      0  

    Default

    Has anybody got the answer for the Legend Renderer...as I'm also lookin for the same...please help if u hav any soln.

  10. #10
    Ext User
    Join Date
    Oct 2010
    Posts
    1
    Vote Rating
    0
      0  

    Default

    It is YUI bug.

Page 1 of 2 12 LastLast

Similar Threads

  1. Pie chart legend problem
    By dave26540 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 2 Dec 2012, 10:25 PM
  2. Line Chart Legend
    By razwan in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Nov 2009, 4:33 AM
  3. [ext 3.0.3] Pie chart disappear wher chart store is reloaded
    By e-tip in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 24 Nov 2009, 7:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •