Print Page | Close Window

How to change Chart Axis

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18041
Printed Date: 21 November 2024 at 1:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change Chart Axis
Posted By: Jing
Subject: How to change Chart Axis
Date Posted: 11 March 2011 at 3:49pm
I am new to ChartPro. I want to change x and y axis range of one graph.
I use the following code:
CXTPChartAxisRange* pRange = pAxisY->GetRange();pRange->SetViewAutoRange(FALSE);  pRange->SetViewMinValue(dYmin);pRange->SetViewMaxValue(dYmax);
similiarly to X axis. But I didnot get what I want to restrict x axis between dXmin and dXmax, and restrict y axis between dYmin and dYmax. Is there anything I should change?
 
Thanks!



Replies:
Posted By: Oleg
Date Posted: 11 March 2011 at 4:26pm
you need SetAutoRange(FALSE),  GetMinValue/GetMaxValue instead.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Jing
Date Posted: 11 March 2011 at 4:36pm

I think you mean SetAutoRange(FALSE), SetMinValue/SetMaxValue right? definitely not get. I tried that, it is not working. It changes my y axis to between dYmin and dYmax, but didn't change x axis to between dXmin and dXmax.



Posted By: Jing
Date Posted: 11 March 2011 at 4:49pm

Another question is how I can control the numbers shown under the axis. For example, the x axis range is from 1 to 10. I want it show like 2,4,6,8,10. How can I control that?



Posted By: Jing
Date Posted: 11 March 2011 at 5:27pm
Smile find the solution.
Oleg, I think the problem for my question is solved. I added the following, then it works fine. Thank you!

pSeries->SetArgumentScaleType(xtpChartScaleNumerical);

 


Posted By: cpede
Date Posted: 21 March 2011 at 9:27am

I'm very sorry to say, but I'm totally lost specifying the axis range? And no documentation?

  • What is the difference between SetViewAutoRange and SetAutoRange for an axis?
  • Why has SetMinValue and SetMaxValue no effect at all?
  • Should I also set SetViewMinValue and SetViewMaxValue?
  • Can I change between different ranges after adding data?
  • Sometimes I get a small scrollbar on the graph, how do I control that?

-cpede

 


-------------
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: cpede
Date Posted: 22 March 2011 at 5:34am
Ok, now I just figured out that auto range has no effect on CXTPChartFastLineSeriesStyle. Probably make sense, but an assertion would have been in place.
 
On the other hand I cannot turn antialiasing off for CXTPChartScatterLineSeriesStyle.
 
-cpede


-------------
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net