[ 3 posts ]

Uwe

  • Username: un0000
  • Joined: Tue Nov 24, 2009 6:22 am
  • Posts: 21
  • Location: Reutlingen (Germany)
  • Offline
  • Profile

Charts 3.3 stacked - overflow axes scaling

Post Posted: Fri Jul 01, 2011 4:18 am
+0-
Hi folks,

I am currently working on implementing charts with the amazing YUI Charts Widget and I came up with the following problem.

If I define axes within configuration properties of a chart the scale will not adjust automatically according to the given data when the chart is a stacked one. But if I create the chart without defining axes everything works fine.

You can have a look on http://jsfiddle.net/unoerpel/s36L6/9/. The current state is with axes definitions and as you can see the columns are overflowing the axes scale. If you delete the axes out of the configuration the scaling works perfect.

Any ideas?

TIA,
Uwe

Tripp Bridges

YUI Developer

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

Re: Charts 3.3 stacked - overflow axes scaling

Post Posted: Fri Jul 01, 2011 10:34 am
+0-
Hi Uwe,

A stacked chart requires a StackedAxis. Changing your consumption axis type from numeric to stacked should do the trick.
Code:
             consumption: {
                 type: "stacked",
                 position: "left",
                 keys: ["miscellaneous", "expenses","revenue"],
                 styles: {
                     majorTicks: {
                         display: "none"
                     },
                     label: {
                         margin: {
                             right: 15,
                             left: 10
                         }
                     }
                 }
             }


Thanks,
Tripp

Uwe

  • Username: un0000
  • Joined: Tue Nov 24, 2009 6:22 am
  • Posts: 21
  • Location: Reutlingen (Germany)
  • Offline
  • Profile
Tags:

Re: Charts 3.3 stacked - overflow axes scaling

Post Posted: Mon Jul 04, 2011 12:04 am
+0-
Hi Trip,

thanks a lot for your reply, it solved the scaling issue.

Cheers,
Uwe
  [ 3 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