[ 5 posts ]

kjaniszewski

  • Joined: Thu Jan 14, 2010 8:51 am
  • Posts: 3
  • Offline
  • Profile

Bar Width in StackedColumnChart

Post Posted: Thu Jan 14, 2010 8:53 am
+0-
Hi.
Is there any way to change width of stacked column?

Thanks

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 440
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Bar Width in StackedColumnChart

Post Posted: Thu Jan 14, 2010 9:19 am
+0-
You can use the size style in your series definition to set the width of the columns in a stacked column chart.
http://developer.yahoo.com/yui/charts/#seriesstyles

Code:
var seriesDef =
[
   {
      xField: "internetsales",
      displayName: "Internet Sales",
      style:{size:4}
   },
   {
      xField: "printsales",
      displayName: "Print Sales",
      style:{size:4}
   }
]

Tripp

kjaniszewski

  • Joined: Thu Jan 14, 2010 8:51 am
  • Posts: 3
  • Offline
  • Profile

Re: Bar Width in StackedColumnChart

Post Posted: Fri Jan 15, 2010 3:28 am
+0-
Hi, thanks for prompt reply.

Unfortunatelly, your hint doesn't help.

My definition of style is like this:

style:
{
size:100, background:{color:0xE2F0F9}, font: {color: 0x666666}
}

Doesn't matter what I put in "size" it doesn't change anything.

My chart looks like this: http://pokazywarka.pl/2c56ii/

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 440
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Bar Width in StackedColumnChart

Post Posted: Fri Jan 15, 2010 6:04 am
+1-
It looks like you are trying to define size in the style object of your chart. You need to set size in the style block of your series definition. Defining series definitions are described here:
http://developer.yahoo.com/yui/charts/#using
Available styles for a series are described here:
http://developer.yahoo.com/yui/charts/#seriesstyles

Also, ensure that you are using 2.8. Previous versions have a bug with sizing markers in a stacked chart.
http://yuilibrary.com/projects/yui2/ticket/2527896

If you are still experiencing issues, please post a repro link and I'll debug it for you.

Tripp

kjaniszewski

  • Joined: Thu Jan 14, 2010 8:51 am
  • Posts: 3
  • Offline
  • Profile

Re: Bar Width in StackedColumnChart

Post Posted: Mon Jan 18, 2010 2:07 am
+0-
Thanks, it works now.

You were right I was trying to force he style on whole chart.

Regards
  [ 5 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum