Jump to content
Software FX Community

Displaying x Axis Gridlines


User (Legacy)

Recommended Posts

Hello,

I need to display both y and x axis grid lines on my charts. y axis will

display as dashed and x will display as solid. I need to display this on a

bar chart and on a scatter plot chart. I can get the y axis lines to

display but not the x axis lines.

My first question is do vertical grid lines (x axis) display on bar charts?

My second question concerns the scatter plot. I have the x axis visible

property set to false. Will the grid lines display if the x axis is not

visible? The line are not displaying.

Both types of charts have the following properties set

Chart.AxisX.Gridlines = True

Chart.AxisX.Grid.Style = Drawing2D.DashStyle.Solid

Chart.AxisX.Visible = False --For scatter plot only.

I am using Chart FX 6.2

Thank you for any assitance.

Russ Murray

Link to comment
Share on other sites

> My first question is do vertical grid lines (x axis) display on bar 

> charts?

Yes. Vertical gridlines display in bar charts.

> My second question concerns the scatter plot. I have the x axis visible

> property set to false. Will the grid lines display if the x axis is not

> visible? The line are not displaying.

If the whole axis is not visible the gridlines will not display, however you

can hide the Axis Text only by using:

chart.AxisX.Style |= AxisStyles.HideText;

--

Francisco Padron

www.chartfx.com

"Russ Murray" <russmurray1@comcast.net> wrote in message

news:0W2o2$q1GHA.1732@webserver3.softwarefx.com...

> Hello,

>

> I need to display both y and x axis grid lines on my charts. y axis will

> display as dashed and x will display as solid. I need to display this on

> a

> bar chart and on a scatter plot chart. I can get the y axis lines to

> display but not the x axis lines.

>

> My first question is do vertical grid lines (x axis) display on bar

> charts?

>

> My second question concerns the scatter plot. I have the x axis visible

> property set to false. Will the grid lines display if the x axis is not

> visible? The line are not displaying.

>

> Both types of charts have the following properties set

>

> Chart.AxisX.Gridlines = True

>

> Chart.AxisX.Grid.Style = Drawing2D.DashStyle.Solid

>

> Chart.AxisX.Visible = False --For scatter plot only.

>

> I am using Chart FX 6.2

>

> Thank you for any assitance.

>

> Russ Murray

>

>

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

I recieved your previous answer. Thanks.

I created a loop that looped through the labels and set the values to

nullstring. This worked.

When I used the HideAllText on the scatter chart, it placed all the markers

on the 0 of the Y axis.

"Russ Murray" <russmurray1@comcast.net> wrote in message

news:0W2o2$q1GHA.1732@webserver3.softwarefx.com...

> Hello,

>

> I need to display both y and x axis grid lines on my charts. y axis will

> display as dashed and x will display as solid. I need to display this on

a

> bar chart and on a scatter plot chart. I can get the y axis lines to

> display but not the x axis lines.

>

> My first question is do vertical grid lines (x axis) display on bar

charts?

>

> My second question concerns the scatter plot. I have the x axis visible

> property set to false. Will the grid lines display if the x axis is not

> visible? The line are not displaying.

>

> Both types of charts have the following properties set

>

> Chart.AxisX.Gridlines = True

>

> Chart.AxisX.Grid.Style = Drawing2D.DashStyle.Solid

>

> Chart.AxisX.Visible = False --For scatter plot only.

>

> I am using Chart FX 6.2

>

> Thank you for any assitance.

>

> Russ Murray

>

>

output.bmp

Link to comment
Share on other sites

Hello,

Here is the code snippet. Thank you for your help.

Russ Murray

Dim iVal As Integer

With MyBase.Chart_2 'With _secondChart

.Gallery = SoftwareFX.ChartFX.Gallery.Scatter

.MarkerShape = SoftwareFX.ChartFX.MarkerShape.Diamond

''''This placed all the markers on the 0 value of the Y axis

'.AxisX.Style = SoftwareFX.ChartFX.AxisStyle.HideText

'''''''''''''''''''''''''''''''''''''''''''''''''''

.AxisY.LabelsFormat.Decimals = 1

.AxisY.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Percentage

.LegendBox = False

.Series(0).Color = Color.Tan

.AxisX.LabelAngle = 90

.PointLabels = True

.PointLabelColor = Color.Black

.PointLabelFont = New Font("Arial", 7, GraphicsUnit.Point)

.Width = MyBase.Chart_1.Width

.SerLegBox = True

.SerLegBoxObj.Docked = SoftwareFX.ChartFX.Docked.Bottom

End With

'This code is active and is working

For iVal = 0 To MyBase.Chart_2.NValues - 1 'Makes the labels blank without

messing with

MyBase.Chart_2.AxisX.Label(iVal) = "" 'the points position

Next

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:BDVwPgj5GHA.3388@webserver3.softwarefx.com...

> Can you please pate the code that you use to hide the labels.

>

> --

> Francisco Padron

> www.chartfx.com

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...