User (Legacy) Posted August 12, 2002 Report Share Posted August 12, 2002 I can manually set the y axis grid lines to the option of "Align with labels" while running the application. Align with labels ensures that labels are displayed centered and aligned with tickmarks at the major interval in the selected axis. How can i set the "Align with labels" option through code? I have tried lots of different code but am stumped. Any advice? With AnyChart With .Axis(AXIS_Y) 'Alignwithlabels = true 'NOT SURE HOW TO DO IT End With End With Thanks in advance, Dan Hickman Link to comment Share on other sites More sharing options...
Software FX Posted August 14, 2002 Report Share Posted August 14, 2002 Hello, You can accomplish this task by setting the style property of the axis object. ChartFX1.Axis(AXIS_Y).Style = ChartFX1.Axis(AXIS_Y).Style Or AS_CENTERED Justin Trask Tech. Support 561-392-2023 "Dan Hickman" <danh@promodel.com> wrote in message news:#g#K4SjQCHA.1060@webserver1.softwarefx.com... > I can manually set the y axis grid lines to the option of "Align with > labels" while running the application. > > Align with labels ensures that labels are displayed centered and aligned > with tickmarks at the major interval in the selected axis. > > How can i set the "Align with labels" option through code? I have tried > lots of different code but am stumped. Any advice? > > > With AnyChart > With .Axis(AXIS_Y) > 'Alignwithlabels = true > 'NOT SURE HOW TO DO IT > End With > End With > > > Thanks in advance, > Dan Hickman > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 2, 2003 Author Report Share Posted April 2, 2003 I am using a Gantt chart (see the chart initialization code below), and your suggestion does not work. I still have to manually go in and set the Y-Axis labels to "Align with labels". What am I doing wrong ? With ChartFX1 ' Start from original chart '.Import CHART_CFXOLEFILE, "original.chd" .Gallery = GANTT .RGB2DBk = RGB(255, 255, 255) .RGBBk = RGB(255, 255, 255) .AxesStyle = CAS_FLATFRAME ' Y-Axis format With .Axis(AXIS_Y) .Grid = True .GridColor = RGB(192, 192, 192) .ResetScale .Format = "dd-MMM-yy" .Style = (.Style Or AS_CENTERED Or AS_INTERLACED) And Not AS_SHOWENDS .LabelAngle = 90 .ResetScale .STEP = 30 ' Monthly End With '... End With Thanks in advance... "SFX Tech Support" <support@softwarefx.com> wrote in message news:SkQGC77QCHA.2120@webserver1.softwarefx.com... > Hello, > > You can accomplish this task by setting the style property of the axis > object. > > ChartFX1.Axis(AXIS_Y).Style = ChartFX1.Axis(AXIS_Y).Style Or AS_CENTERED > > Justin Trask > Tech. Support > 561-392-2023 > > "Dan Hickman" <danh@promodel.com> wrote in message > news:#g#K4SjQCHA.1060@webserver1.softwarefx.com... > > I can manually set the y axis grid lines to the option of "Align with > > labels" while running the application. > > > > Align with labels ensures that labels are displayed centered and aligned > > with tickmarks at the major interval in the selected axis. > > > > How can i set the "Align with labels" option through code? I have tried > > lots of different code but am stumped. Any advice? > > > > > > With AnyChart > > With .Axis(AXIS_Y) > > 'Alignwithlabels = true > > 'NOT SURE HOW TO DO IT > > End With > > End With > > > > > > Thanks in advance, > > Dan Hickman > > > > > > Link to comment Share on other sites More sharing options...
Software FX Posted April 2, 2003 Report Share Posted April 2, 2003 "Align With Labels" is the Default. AS_CENTERED is the opposite to this. In a default chart AS_CENTERED is OFF and therefore "Align With Labels" option is checked. Either you turned this OFF at design time or somewhere in your code. You can test this very easily, simply drop a brand new char in a form, run the application and got to the Y-Axis property pages. You should see the "Align With Labels" checked. To turn it OFF after it is turned ON you need to do: ChartFX1.Axis(AXIS_Y).Style = ChartFX1.Axis(AXIS_Y).Style and not AS_CENTERED -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.