M
Marcin Zmyslowski
Hello all!
I have the following problem. I would like to move the x axis values
from my chart. The X Axis Values are very near the x axis, that`s why I
want to put a space between the x axis and x axis values. How can I do
tha? I use Webchart component as a chart.]
Here is my code which set the properities of the chart:
Private Sub SetMoreProperties(ByVal engine As
ChartEngine, max as single)
' Set-up the XTitle
Dim myFont As New System.Drawing.Font("Tahoma",
8)
engine.XTitle = New ChartText()
'engine.chartlegend.width=20
'engine.showlegend=true
engine.legend.width=210
engine.HasChartLegend = true
engine.Border.Color=Color.DarkGray
engine.GridLines = WebChart.GridLines.Both
Dim horizontalFormat As New StringFormat()
horizontalFormat.LineAlignment =
StringAlignment.Far
engine.XTitle.StringFormat = horizontalFormat
engine.XTitle.Text = "Tydzieñ (numer)"
engine.XTitle.Font = myFont
' Set-up the YTitle
engine.YTitle = New ChartText()
engine.YTitle.Font = myFont
Dim verticalFormat As New StringFormat()
verticalFormat.FormatFlags =
StringFormatFlags.DirectionVertical
verticalFormat.Alignment =
StringAlignment.center
engine.YTitle.StringFormat = verticalFormat
engine.YTitle.Text = "Procent (%)"
engine.leftchartpadding=35
engine.bottomchartpadding=40
'engine.XAxisFont.StringFormat = verticalFormat
'engine.XAxisFont.ForeColor="Black"
'ustawianie wielkosci osi ox i odstêpu
Dim myFont1 As New System.Drawing.Font("Tahoma",
8)
engine.XAxisFont.StringFormat = verticalFormat
engine.XAxisFont.Font=myFont1
'ustawianie max wartosc oy
engine.ycustomend=max*0.1+max
'engine.ycustomend=max+10
engine.ycustomstart=-2
' Set-up the Title
engine.Title = New ChartText()
engine.Title.ForeColor = Color.White
engine.Title.Font = new Font("Tahoma", 12,
FontStyle.Bold)
engine.Title.Text = "Udzia³ procentowy zamówieñ
wed³ug odpowiednich statusów w czasie"
' Specify show XValues
engine.ShowXValues = True
engine.ShowYValues = True
' Some padding
engine.Padding = 50
engine.ChartPadding = 0
' some color
engine.Background.Type =
InteriorType.LinearGradient
engine.Background.EndPoint = new
Point(1800,1800)
engine.Background.Color = Color.FromArgb(70,
Color.DarkBlue)
' some color
engine.PlotBackground.Color = Color.LightYellow
'Dim myFont1 As New
System.Drawing.Font("Tahoma", 8)
End Sub
I will appreciate every help.
Thank you in advance
Marcin from Poland
I have the following problem. I would like to move the x axis values
from my chart. The X Axis Values are very near the x axis, that`s why I
want to put a space between the x axis and x axis values. How can I do
tha? I use Webchart component as a chart.]
Here is my code which set the properities of the chart:
Private Sub SetMoreProperties(ByVal engine As
ChartEngine, max as single)
' Set-up the XTitle
Dim myFont As New System.Drawing.Font("Tahoma",
8)
engine.XTitle = New ChartText()
'engine.chartlegend.width=20
'engine.showlegend=true
engine.legend.width=210
engine.HasChartLegend = true
engine.Border.Color=Color.DarkGray
engine.GridLines = WebChart.GridLines.Both
Dim horizontalFormat As New StringFormat()
horizontalFormat.LineAlignment =
StringAlignment.Far
engine.XTitle.StringFormat = horizontalFormat
engine.XTitle.Text = "Tydzieñ (numer)"
engine.XTitle.Font = myFont
' Set-up the YTitle
engine.YTitle = New ChartText()
engine.YTitle.Font = myFont
Dim verticalFormat As New StringFormat()
verticalFormat.FormatFlags =
StringFormatFlags.DirectionVertical
verticalFormat.Alignment =
StringAlignment.center
engine.YTitle.StringFormat = verticalFormat
engine.YTitle.Text = "Procent (%)"
engine.leftchartpadding=35
engine.bottomchartpadding=40
'engine.XAxisFont.StringFormat = verticalFormat
'engine.XAxisFont.ForeColor="Black"
'ustawianie wielkosci osi ox i odstêpu
Dim myFont1 As New System.Drawing.Font("Tahoma",
8)
engine.XAxisFont.StringFormat = verticalFormat
engine.XAxisFont.Font=myFont1
'ustawianie max wartosc oy
engine.ycustomend=max*0.1+max
'engine.ycustomend=max+10
engine.ycustomstart=-2
' Set-up the Title
engine.Title = New ChartText()
engine.Title.ForeColor = Color.White
engine.Title.Font = new Font("Tahoma", 12,
FontStyle.Bold)
engine.Title.Text = "Udzia³ procentowy zamówieñ
wed³ug odpowiednich statusów w czasie"
' Specify show XValues
engine.ShowXValues = True
engine.ShowYValues = True
' Some padding
engine.Padding = 50
engine.ChartPadding = 0
' some color
engine.Background.Type =
InteriorType.LinearGradient
engine.Background.EndPoint = new
Point(1800,1800)
engine.Background.Color = Color.FromArgb(70,
Color.DarkBlue)
' some color
engine.PlotBackground.Color = Color.LightYellow
'Dim myFont1 As New
System.Drawing.Font("Tahoma", 8)
End Sub
I will appreciate every help.
Thank you in advance
Marcin from Poland