EDN Admin
Well-known member
Hi I have created a chart in visual basic and I have added code to edit the font size of the X axis and Y axis label but I am not able to change the font size and color of the title of the chart. THe code I used to change the X axis and Y axis label is as
follows:
<pre class="prettyprint lang-vb Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myfont As New Windows.Forms.FontDialog()
FontDialog1.ShowDialog()
myfont.ShowDialog()
TextBoxcharttitle.Font = myfont.Font
Chart.Chart1age.ChartAreas(0).AxisX.TitleFont = myfont.Font
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim myfont As New Windows.Forms.FontDialog()
FontDialog1.ShowDialog()
myfont.ShowDialog()
Chart.Chart1age.ChartAreas(0).AxisY.TitleFont = myfont.Font
End Sub[/code]
<br/>
Please help me how to edit the chart title font and color. Thank you so much.
<br/>
View the full article
follows:
<pre class="prettyprint lang-vb Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myfont As New Windows.Forms.FontDialog()
FontDialog1.ShowDialog()
myfont.ShowDialog()
TextBoxcharttitle.Font = myfont.Font
Chart.Chart1age.ChartAreas(0).AxisX.TitleFont = myfont.Font
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim myfont As New Windows.Forms.FontDialog()
FontDialog1.ShowDialog()
myfont.ShowDialog()
Chart.Chart1age.ChartAreas(0).AxisY.TitleFont = myfont.Font
End Sub[/code]
<br/>
Please help me how to edit the chart title font and color. Thank you so much.
<br/>
View the full article