Welcome Guest Search | Active Topics |

I am unable to change the angle of X-Axis(bottom) from code behind
dhanu
#1 Posted : Friday, January 17, 2014 4:56:56 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2014(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I am unable to change the angle of X-Axis(bottom) from code behind.


JQChart.Web.UI.WebControls.LinearAxis _linearAxis1 = new JQChart.Web.UI.WebControls.LinearAxis();
_linearAxis1.Maximum = _maxvalue + 1000;
_linearAxis1.Minimum =0;
_linearAxis1.Interval = 4000;

_linearAxis1.Labels.Angle = -45; its changing the angle of Y-axis but we need both from code behind not from script.

ChartLead.Axes.Add(_linearAxis1);

ChartLead.Series[0].FillStyle.Color = "#609749";
ChartLead.Series[1].FillStyle.Color = "#e60000";
Dragan
#2 Posted : Friday, January 17, 2014 5:31:20 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
You need to add this code as well:


Code:
JQChart.Web.UI.WebControls.CategoryAxis _categoryAxis1 = new JQChart.Web.UI.WebControls.CategoryAxis();
_categoryAxis1.Location = JQChart.Web.UI.WebControls.Location.Bottom;
_categoryAxis1.Labels.Angle = -45;
ChartLead.Axes.Add(_categoryAxis1);
Best Regards,
Dragan Matek
jqChart Inc.
dhanu
#3 Posted : Friday, January 17, 2014 5:36:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2014(UTC)
Posts: 5

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
_categoryAxis1.Location = Location.Bottom;///giving error for Location
Dragan
#4 Posted : Friday, January 17, 2014 5:41:32 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Change it to:

_categoryAxis1.Location = JQChart.Web.UI.WebControls.Location.Bottom;
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.141 seconds.