Results 1 to 6 of 6

Thread: StackedBarChart query

  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2009
    Posts
    35

    Question StackedBarChart query

    I am using the below to configure my chart


    var stackedBarChart = new Ext.Panel({
    width: 600,
    height: 400,
    autoScroll: true,
    title: 'Performance Analysis',
    items: {
    xtype: 'stackedbarchart',
    store: getTimeLineStore(),
    yField: 'eventName',
    xAxis: new Ext.chart.NumericAxis({
    stackingEnabled: true
    }),
    series: [
    {style: { colors: ['#F87217', ' #FF0000' , '#4AA02C']}},
    {
    xField: 'offset',
    displayName: 'Start Offset (Time before actual event star.)'
    },{
    xField: 'totalTime',
    displayName: 'Total Time taken'
    }]
    }
    });

    I want to apply custom color to each series item. Like offset should have white color and totalTime should have green color. I tried giving style to series but the colors do not get picked up. the colors get changed if i provide a style element in series element but they are not the once which I define. Please help me to configure custom color for series.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Each series needs it's own "style: {color: '#xyz'}" config option.

    Also, 'styles' is only valid for pie charts.

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2009
    Posts
    35

    Default Thanks

    Thanks Condor. Found the same information on yahoo chart help as well and it worked. However i would now like to use the visibility: 'hidden' option mentioned in http://developer.yahoo.com/yui/charts/#basicstyles

    Does visibility: 'hidden' option work for a a series? i am trying it but the series is still visible. Any help on what I might be missing?

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    It should work, but how are you setting the visibility style?

  5. #5
    Ext JS Premium Member
    Join Date
    Jan 2009
    Posts
    35

    Default

    series: [
    {
    xField: 'offset',
    displayName: 'Start Offset (Time before actual event star.)',
    visibility: 'hidden'
    },{
    xField: 'totalTime',
    displayName: 'Total Time taken',
    style: {
    color: 0x54C571

    }
    }]

  6. #6
    Ext JS Premium Member
    Join Date
    Jan 2009
    Posts
    35

    Default

    Got it.. i think it should go under style.. will try that.. thanks

Similar Threads

  1. StackedBarChart issue
    By oddy in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 22 Sep 2013, 4:44 AM
  2. DOT character in StackedBarChart
    By vinothbabu in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 29 Sep 2010, 5:52 AM
  3. stackedbarchart - Display value over bar
    By gabbay in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 24 May 2010, 2:31 PM
  4. Stackedbarchart
    By ChristianV in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 27 Jan 2010, 5:47 AM
  5. How to change values of StackedBarChart and refresh it.?
    By chandankumarbv in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 2 Sep 2009, 2:54 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
  •