我目前做的项目是vb.net移行项目,
移行前项目所用.Net Freamwork 1.1 ;C1.Win.C1Chart:1.0.20034.13244
移行后项目所用.Net Freamwork 4.8 ;C1.Win.C1Chart:4.5.2
移行前所生成的图表网格线与移行后所生成的图表网格线表示有不同的地方,想问一下:
1.这种情况是受到哪一个或几个属性所影响?
2.能否在移行后实现同移行前一样的效果?
移行前: 移行后:
图表生成的方式为下面代码:
Private Sub Test()
Dim ChtC1 As C1Chart
Dim Height As Double
Dim Width As Double
Dim CdsData As New ChartDataSeries
Dim Point() As PointF
ChtC1 = New C1Chart
ChtC1.Reset()
Dim area As Area = ChtC1.ChartArea
area.Location = New Point(0, 0)
Width = (0 + (118.0 * 6.66666651)) - (0 + (87.0 * 6.66666651))
Height = (0 + (37.0 * 15.0757074)) - (0 + (28.0 * 15.0757074))
area.Size = New Size(Width, Height)
area.AxisX.ForeColor = Color.Empty
area.AxisY.ForeColor = Color.Empty
area.AxisY.GridMajor.Color = Color.Black
area.AxisY.GridMajor.Visible = True
area.AxisX.GridMajor.Color = Color.Black
area.AxisX.GridMajor.Visible = True
Dim group As ChartGroup = ChtC1.ChartGroups(0)
group.ChartType = Chart2DTypeEnum.XYPlot
Dim data As ChartData = group.ChartData
ReDim Preserve Point(0)
Point(0) = New PointF(0, 0)
CdsData.PointData.CopyDataIn(Point)
data.SeriesList.Add(CdsData)
Me.PictureBox1.Image = ChtC1.GetImage()
Me.PictureBox1.Refresh()
ChtC1.Dispose()
End Sub
|