![]() |
How to change Chart Axis |
Post Reply ![]() |
Author | |
Jing ![]() Groupie ![]() Joined: 14 February 2011 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() 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!
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
you need SetAutoRange(FALSE), GetMinValue/GetMaxValue instead.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Jing ![]() Groupie ![]() Joined: 14 February 2011 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Jing ![]() Groupie ![]() Joined: 14 February 2011 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Jing ![]() Groupie ![]() Joined: 14 February 2011 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
![]() Oleg, I think the problem for my question is solved. I added the following, then it works fine. Thank you!
pSeries->SetArgumentScaleType(xtpChartScaleNumerical); |
|
![]() |
|
cpede ![]() Senior Member ![]() Joined: 13 August 2004 Location: Denmark Status: Offline Points: 680 |
![]() ![]() ![]() ![]() ![]() |
I'm very sorry to say, but I'm totally lost specifying the axis range? And no documentation?
-cpede |
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
![]() |
|
cpede ![]() Senior Member ![]() Joined: 13 August 2004 Location: Denmark Status: Offline Points: 680 |
![]() ![]() ![]() ![]() ![]() |
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++) |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() 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 |