如何让VB中MSCHART控件显示数据比较的效果?

2024-05-17 03:07

1. 如何让VB中MSCHART控件显示数据比较的效果?

建一个交叉表视图,再用VB中的程序解决。

---
以上,希望对你有所帮助。

如何让VB中MSCHART控件显示数据比较的效果?

2. vs2010中怎么找不mschart控件

在工具箱-数据中选择chart即可。

3. VB MSCHART控件 X轴整数显示问题

.Plot.Axis(VtChAxisIdX).ValueScale.Maximum = 0.6 '设置横轴标注最大值
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 0.3 '设置纵轴标注最大值
我想.Plot.Axis(VtChAxisIdX).ValueScale.Maximum =后面的值改为整数,表现出来应该是你的要求,你试试

VB MSCHART控件 X轴整数显示问题

4. 我在vc++在用MSChart控件画的饼图,在我电脑上显示没问题,但在其他电脑上显示错误。

如果别人的电脑上没有MSChart,那你肯定是要先给他拷贝MSChart控件,并注册。如果注册完还有问题,那就可能是别的原因。

你找到类似于mschart.ocx或者mschart20.ocx 的文件,把它拷贝到别人电脑上。然后在DOS窗口下执行:
      regsvr32.exe mschart.ocx
即可注册。

5. VB如何让mschart控件只显示坐标,不显示曲线

Private Sub Chart_Ini()
    '初始化图表
    '-----x轴坐标值-----Y轴坐标值----------
    
    ReDim MyDataH(20, 1)
    ReDim MyDataA(20, 1)
    
    For i = 0 To 20
        MyDataH(i, 0) = 0
        MyDataH(i, 1) = 0
        
        MyDataA(i, 0) = 0
        MyDataA(i, 1) = 0
    Next i
    
    '波形图外观设置
    With Chart1
        '设置图线的外观
        .Plot.SeriesCollection(1).Pen.Width = 30
        .Plot.SeriesCollection(1).Pen.Style = VtPenStyleSolid
        
        '设置XY轴
        .Plot.Axis(VtChAxisIdX).ValueScale.Auto = False
        .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
        
        '// 设置最大值
        .Plot.Axis(VtChAxisIdX).ValueScale.Maximum = 200
        .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 300
        
        '// 设置最小值
        .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
        
        .Plot.Axis(VtChAxisIdX).ValueScale.Minimum = 0
        
        '//
        .Plot.Axis(VtChAxisIdX).ValueScale.MajorDivision = 10                   'X轴主要网格数量
        
        .Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 10                   'Y轴主要网格数量
        
        .Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision = 0                    'X轴次要网格数量
        
        .Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 0                    'Y轴次要网格数量
        
        .Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.Style = VtPenStyleDotted
        .Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.Style = VtPenStyleDotted
        
        .Plot.AutoLayout = False
        .Plot.UniformAxis = False
        
        .chartType = VtChChartType2dXY                                          '设置图形为二维散点图
        .ChartData = MyDataH                                                    '数据
    End With
    
    '波形图外观设置
    With Chart2
        '设置图线的外观
        .Plot.SeriesCollection(1).Pen.Width = 30
        .Plot.SeriesCollection(1).Pen.Style = VtPenStyleSolid
        
        '设置XY轴
        .Plot.Axis(VtChAxisIdX).ValueScale.Auto = False
        .Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
        
        '// 设置最大值
        .Plot.Axis(VtChAxisIdX).ValueScale.Maximum = 200
        .Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 300
        
        '// 设置最小值
        .Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
        
        .Plot.Axis(VtChAxisIdX).ValueScale.Minimum = 0
        
        '//
        .Plot.Axis(VtChAxisIdX).ValueScale.MajorDivision = 10                   'X轴主要网格数量
        
        .Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 10                   'Y轴主要网格数量
        
        .Plot.Axis(VtChAxisIdX).ValueScale.MinorDivision = 0                    'X轴次要网格数量
        
        .Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 0                    'Y轴次要网格数量
        
        .Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.Style = VtPenStyleDotted
        .Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.Style = VtPenStyleDotted
        
        .Plot.AutoLayout = False
        .Plot.UniformAxis = False
        
        .chartType = VtChChartType2dXY                                          '设置图形为二维散点图
        .ChartData = MyDataA                                                    '数据
    End With
End Sub

VB如何让mschart控件只显示坐标,不显示曲线

6. 怎样安装mschart控件

该数据网格存放了要显示的数据。数据网格也可以包含用于图表中标识系列或类别的标签。图表应用程序设计者在数据网格中插入数据或从报表或矩阵中输入数据。
  属性  ActiveSeriesCount属性,AllowDithering属性,AllowDynamicRotation属性,AllowSelections属性,AllowSeriesSelection属性,AutoIncrement属性,Visible属性(MSChart),Backdrop属性,Chart3d属性,ChartData属性,ChartType属性,Column属性,ColumnCount属性,ColumnLabel属性(MSChart),ColumnLabelCount属性,ColumnLabelIndex属性,Data属性(MSChart),DataGrid 属性,DoSetCursor属性,DrawMode属性(MSChart),Footnote属性,FootnoteText属性,Legend属性,MousePointer属性,Plot属性,RandomFill属性,Repaint属性,Row属性(MSChart),RowCount属性(MSChart),RowLabel属性(MSChart),RowLabelCount属性,RowLabelIndex属性,SerieColumn属性,SeriesType属性,ShowLegend属性,Stacking属性,TextLengthType属性,Title属性(MSChart),TitleText属性, DataBindings属性,Drag方法,TabIndex属性,DragIcon属性,DragMode属性,CausesValidation属性,TabStop属性,HelpContextID属性,Name属性,Parent属性,Container属性,ToolTipText属性,WhatsThisHelpID属性,OLEDragMode属性(ActiveX控件),OLEDropMode属性(ActiveX控件),Height,WidthProperties属性(ActiveX控件),Tag属性(ActiveX控件),Visible属性 (ActiveX控件),Object属性(ActiveX控件),DataMember属性(ActiveX控件),BorderStyle属性(ActiveX控件),Enabled属性(ActiveX控件),DataSource属性(ActiveX控件),HWnd属性(ActiveX控件),ActiveSeriesCount属性,AllowDithering属性,AllowDynamicRotation属性,AllowSelections属性,AllowSeriesSelection属性,AutoIncrement属性,Visible属性 (MSChart),Backdrop属性,Chart3d属性,ChartData属性,ChartType属性,Column属性,ColumnCount属性,ColumnLabel属性(MSChart),ColumnLabelCount属性,ColumnLabelIndex属性,Data属性(MSChart),DataGrid属性,DoSetCursor属性,DrawMode属性 (MSChart),Footnote属性,FootnoteText属性,Legend属性,MousePointer属性 (MSChart),Plot属性,RandomFill属性,Repaint属性,Row属性(MSChart),RowCount属性 (MSChart),RowLabel属性(MSChart),RowLabelCount属性,RowLabelIndex属性,SeriesColumn属性,SeriesType属性,ShowLegend属性,Stacking属性,TextLengthType属性,Title属性(MSChart),TitleText属性,DataBindings属性,Drag方法,TabIndex属性,DragIcon 属性,DragMode属性,CausesValidation属性,TabStop属性,HelpContextID属性,Name属性,Parent 属性,Container属性,ToolTipText属性,WhatsThisHelpID属性,OLEDragMode属性(ActiveX控件),OLEDropMode属性(ActiveX控件),Height,WidthProperties属性(ActiveX控件),Index属性 (ActiveX控件),Left,Top Properties属性(ActiveX控件),Tag属性(ActiveX控件),Visible属性(ActiveX控件),Object属性 (ActiveX控件),DataMember属性(ActiveX控件),BorderStyle属性(ActiveX控件),Enabled属性 (ActiveX控件),DataSource属性(ActiveX控件),hWnd属性(ActiveX控件)  方法  EditCopy方法,EditPaste方法,GetSelectedPart方法,Layout方法,SelectPart方法,ToDefaults方法,TwipsToChartPart方法,SetFocus方法,Drag方法,Move方法,ZOrder方法,ShowWhatsThis方法,OLEDrag方法(ActiveX控件),Refresh方法(ActiveX 控件),EditCopy方法,EditPaste方法,GetSelectedPart方法,Layout方法,SelectPart方法,ToDefaults方法,TwipsToChartPart方法,SetFocus方法,Drag方法,Move方法,ZOrder方法,ShowWhatsThis方法,OLEDrag方法(ActiveX控件),Refresh方法(ActiveX控件)  事件  AxisActivated事件,AxisLabelActivated事件,AxisLabelSelected事件,AxisLabelUpdated事件,AxisSelected事件,AxisTitleActivated事件,AxisTitleSelected事件,AxisTitleUpdated事件,AxisUpdated事件,ChartActivated事件,CharSelected事件,ChartUpdated事件,DataUpdated事件,DonePainting事件,FootnoteActivated事件,FootnoteSelected事件,FootnoteUpdated事件,LegendActivated事件,LegendSelected事件,LegendUpdated事件,PlotActivated事件,PlotSelected事件,PlotUpdated事件,PointActivated事件,PoinLabelActivated事件,PointLabelSelected事件,PointLabelUpdated事件,PointSelected事件,PointUpdated事件,SeriesActivated事件,SeriesSelected事件,SeriesUpdated事件,TitleActivated事件,TitleSelected事件,TitleUpdated事件,DragDrop事件,DragOver事件,GotFocus事件,LostFocus事件,Validate事件,OLECompleteDrag事件(ActiveX控件),OLEDragDrop事件(ActiveX控件),OLEDragOver事件 (ActiveX控件),OLEGiveFeedback事件(ActiveX控件),OLESetData事件(ActiveX控件),OLEStartDrag事件(ActiveX控件),Click事件(ActiveX控件),DblClick事件(ActiveX控件),KeyDown,KeyUp事件(ActiveX控件),KeyPress事件(ActiveX控件),MouseDown,MouseUp事件 (ActiveX控件),MouseMove事件(ActiveX控件)

7. MSChart控件

你的问题我没太明白,但“把X轴的的统计项用竖线隔开”,我个人觉得这样的效果很不规范

MSChart控件

8. 求问vc下mschart控件怎么不显示折现上的值?

你设置 几个点中显示一个啊
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetAuto(FALSE);            // 不自动标注X轴刻度
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerLabel(2);// 每刻度一个标注
m_Chart.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerTick(1); // 每刻度一个刻度线