Foxtable(狐表)用户栏目专家坐堂 → 如何不建立窗口生成雷达图并保存为图片文件呢?


  共有3686人关注过本帖树形打印复制链接

主题:如何不建立窗口生成雷达图并保存为图片文件呢?

帅哥哟,离线,有人找我吗?
Bin
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2015/5/19 9:51:00 [显示全部帖子]

一定要利用窗口控件呢.

 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2015/5/19 10:05:00 [显示全部帖子]

Dim c1Chart1 = Forms("窗口1").Controls("Chart1").BaseControl

改为

Dim c1Chart1 = new C1.Win.C1Chart.C1Chart

 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2015/5/19 10:40:00 [显示全部帖子]


Dim c1Chart1 = new C1.Win.C1Chart.C1Chart



c1Chart1.ChartGroups(0).ChartType = C1.Win.C1Chart.Chart2DTypeEnum.Radar

c1Chart1.BackColor = Color.White

' Setup the header and footer
c1Chart1.Header.Style.Font = New Font("Microsoft Sans Serif", 9, FontStyle.Bold)
c1Chart1.Header.Text = "Employment Candidate Review"
c1Chart1.Footer.Visible = False

' Setup the legend
c1Chart1.Legend.Compass = C1.Win.C1Chart.CompassEnum.South
c1Chart1.Legend.Orientation = C1.Win.C1Chart.LegendOrientationEnum.Horizontal
c1Chart1.Legend.Visible = True

' Setup the Axis X
Dim ax As C1.Win.C1Chart.Axis = c1Chart1.ChartArea.AxisX
ax.Font = New Font("Arial", 8)
ax.Thickness = 2
ax.AnnoMethod = C1.Win.C1Chart.AnnotationMethodEnum.ValueLabels
ax.GridMajor.Color = Color.DarkGray
ax.GridMajor.Pattern = C1.Win.C1Chart.LinePatternEnum.Solid
ax.GridMajor.Thickness = 2
ax.GridMajor.Visible = True

' Setup the value labels
Dim vlbl As C1.Win.C1Chart.ValueLabel = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 1
vlbl.Text = "Experience"

vlbl = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 2
vlbl.Text = "Education"

vlbl = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 3
vlbl.Text = "Communication"

vlbl = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 4
vlbl.Text = "Friendliness"

vlbl = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 5
vlbl.Text = "Presentation"

vlbl = ax.ValueLabels.AddNewLabel()
vlbl.NumericValue = 6
vlbl.Text = "Expression"

' Setup the Axis Y
Dim ay As C1.Win.C1Chart.Axis = c1Chart1.ChartArea.AxisY
ay.Min = 0
ay.Max = 5
ay.UnitMinor = 0
ay.UnitMajor = 1
ay.Compass = C1.Win.C1Chart.CompassEnum.North

c1Chart1.UseAntiAliasedGraphics = True

'输入具体数据生成图表

c1Chart1.ChartGroups(0).ChartType = C1.Win.C1Chart.Chart2DTypeEnum.Radar
Dim series As C1.Win.C1Chart.ChartDataSeriesCollection = c1Chart1.ChartGroups(0).ChartData.SeriesList
series.RemoveAll()

' Fill the X array
Dim x As Integer() = CType(Array.CreateInstance(Gettype(Integer), 6), Integer())
Dim i As Integer
For i = 0 To x.Length - 1
    x(i) = i + 1
Next i

' Add one series
Dim s As C1.Win.C1Chart.ChartDataSeries = series.AddNewSeries()
s.LineStyle.Color = Color.SeaGreen
s.LineStyle.Thickness = 2
s.LineStyle.Pattern = C1.Win.C1Chart.LinePatternEnum.Solid
s.SymbolStyle.Color = Color.FromArgb(90, Color.Lime)
s.SymbolStyle.Shape = C1.Win.C1Chart.SymbolShapeEnum.Tri
s.SymbolStyle.Size = 8
s.Label = "Michael Johnson"
s.Display = C1.Win.C1Chart.SeriesDisplayEnum.Show

Dim y() As Integer = {5, 3, 4, 5, 4, 2}
s.X.CopyDataIn(x)
s.Y.CopyDataIn(y)

' Add one series
s = series.AddNewSeries()
s.LineStyle.Color = Color.Navy
s.LineStyle.Thickness = 2
s.LineStyle.Pattern = C1.Win.C1Chart.LinePatternEnum.Solid
s.SymbolStyle.Color = Color.FromArgb(90, Color.CornflowerBlue)
s.SymbolStyle.Shape = C1.Win.C1Chart.SymbolShapeEnum.Dot
s.SymbolStyle.Size = 8
s.Label = "Jim Hubbard"
s.Display = C1.Win.C1Chart.SeriesDisplayEnum.Show

y = New Integer() {3, 5, 3, 4, 3, 4}
s.X.CopyDataIn(x)
s.Y.CopyDataIn(y)

' Add one series
s = series.AddNewSeries()
s.LineStyle.Color = Color.Chocolate
s.LineStyle.Thickness = 2
s.LineStyle.Pattern = C1.Win.C1Chart.LinePatternEnum.Dot
s.SymbolStyle.Color = Color.FromArgb(90, Color.Orange)
s.SymbolStyle.Shape = C1.Win.C1Chart.SymbolShapeEnum.Diamond
s.SymbolStyle.Size = 8
s.Label = "Larry Richardson"
s.Display = C1.Win.C1Chart.SeriesDisplayEnum.Show

y = New Integer() {5, 3, 2, 3, 4, 4}
s.X.CopyDataIn(x)
s.Y.CopyDataIn(y)
c1Chart1.SaveImage("1.jpg",System.Drawing.Imaging.ImageFormat.JPEG)

 回到顶部