Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - How to change the major units of axis
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change the major units of axis

 Post Reply Post Reply
Author
Message
Jing View Drop Down
Groupie
Groupie


Joined: 14 February 2011
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jing Quote  Post ReplyReply Direct Link To This Post Topic: How to change the major units of axis
    Posted: 14 March 2011 at 3:38pm
I have a question about changing major units of axis. For example, I want to show the number below axis is 1,2,3,4,5,6,7,8,9 instead of 2,4,6,8 by the chart plot default. Which class and method I should use here. Thank you in advance!
Back to Top
Andy121070 View Drop Down
Groupie
Groupie


Joined: 01 December 2010
Location: UK
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy121070 Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2018 at 11:34am
I have the same issue?

What is the correct way of doing this?

Regards

Andy
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2018 at 2:09pm
Hello,

    pDiagram->GetAxisX()->SetGridSpacingAuto(FALSE);
    pDiagram->GetAxisX()->SetGridSpacing(1);

See implementation of method CXTPChartDiagram2DAxisView::CreateTickMarks

Regards,
 Oleksandr Lebed
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.141 seconds.