Print Page | Close Window

How to change the major units of 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=18054
Printed Date: 21 November 2024 at 10:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change the major units of axis
Posted By: Jing
Subject: How to change the major units of axis
Date 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!



Replies:
Posted By: Andy121070
Date Posted: 14 May 2018 at 11:34am
I have the same issue?

What is the correct way of doing this?



-------------
Regards

Andy


Posted By: olebed
Date 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



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