Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Chart Control
  New Posts New Posts RSS Feed - Changing bar chart orientation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Changing bar chart orientation

 Post Reply Post Reply
Author
Message
prounds View Drop Down
Newbie
Newbie


Joined: 04 January 2011
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote prounds Quote  Post ReplyReply Direct Link To This Post Topic: Changing bar chart orientation
    Posted: 04 January 2011 at 2:02pm
How does one change the orientation of a bar chart from vertical to horizontal?
 
I'm working in a C# environment (vs2005) in a windows application, XtremeChart gets added as a COM object to my environment, and gets exposed as axChartControl.  I can't find where I can set the orientation of the chart.
 
My simple sample code is:

XtremeChartControl.ChartBarSeriesStyle BarStyle = new XtremeChartControl.ChartBarSeriesStyle();

if (this.axChartControl.Content.Series.Count > 0)

this.axChartControl.Content.Series.DeleteAll();

axChartControl.Content.Titles.DeleteAll();

axChartControl.Content.Titles.Add("Estimated Purchase Probabilities");

axChartControl.Content.Legend.Visible = true;

XtremeChartControl.ChartSeries dataSeries;

dataSeries = axChartControl.Content.Series.Add("Original PP");

dataSeries.Points.Add("Prod #1", 23);

dataSeries.Points.Add("Prod #2", 43);

dataSeries.Points.Add("Prod #3", 37);

dataSeries = axChartControl.Content.Series.Add("Modified PP");

dataSeries.Points.Add("Prod #1", 43);

dataSeries.Points.Add("Prod #2", 63);

dataSeries.Points.Add("Prod #3", 17);

for (int i = 0; i < 2 /*axChartControl.Content.Series.Count */; i++)

{

axChartControl.Content.Series.Style = (XtremeChartControl.ChartSeriesStyle)BarStyle;

}

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2011 at 2:48pm
Try dataSeries.Diagram.Rotated = True for each of the series that you add to the Chart.

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
prounds View Drop Down
Newbie
Newbie


Joined: 04 January 2011
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote prounds Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2011 at 4:13pm

In my configuration, Rotated is not exposed as a property of dataSeries.Diagram

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2011 at 4:21pm
I use VB6, so I'm not sure how it's done in C# - but can you set the Series.Diagram to a ChartDiagram2D object. It has the Rotated property.

In VB6:


Dim lo_Diagram2d As ChartDiagram2D

Set lo_Diagram2d = dataSeries.Diagram
lo_Diagram2d.Rotated = True

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.