ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  using SwapXY with a bar chart
Posted by brian P on Jun-01-2012 02:25
Hi, I notice this interesting behavior; am wondering if I can prevent it!?

I have a (pretty simple) vertical bar chart, let's say there are 4 bars , left-to-right A, B, C, D.  All is good.
I use SwapXY to convert it into a horizontal bar chart.
I notice the bars in the revised graph are now presented top-to-bottom as D, C, B, A, whereas I would have expected them to be A, B, C, D.

This is classic ASP, and on the same page I also happen to present the same data in a data table.  So the net result is that the displayed table has rows A, B, C, D, but the accompanying graph has horizontal bars are D, C, B, A.  The users find this a little confusing, if you see what I mean.

Any way to overcome this, so that the bars are presented  A, B, C, D?

hey thanks

bp/Canada

  Re: using SwapXY with a bar chart
Posted by Peter Kwan on Jun-02-2012 08:38
Hi Brian,

In ChartDirector, the origin of an XYChart is at the bottom left corner. On the horizontal axis, the labels flow from left to right (just imagine the labels A, B, C, D happens to be "0", "10", "20", "30"). On the vertical axis, the labels "0", "10", "20", "30" would flow from bottom to top (the "0" is at the original position, the "10" above it, and so on).

In some applications, it is preferable to have the labels flow from top to bottom for a vertical axis. In this case, you may use Axis.setReverse to reverse the axis. For example, in C#/Java:

c.xAxis().setReverse();

Hope this can help.

Regards
Peter Kwan

  Re: using SwapXY with a bar chart
Posted by brian p on Jun-03-2012 05:02
Yup, that does it, awesome.
And thanks for the detailed explanation, that makes perfect sense now; much apprec.  :)

/bp