PRB: Cannot Set Marker Size or Style for MSChart

Last reviewed: December 30, 1997
Article ID: Q178545
The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0

SYMPTOMS

Setting the Size or Style properties of the marker object in the Microsoft Chart control at run-time does not result in size or style changes.

CAUSE

The SeriesMarker Auto Property is set to False.

RESOLUTION

Set the SeriesMarker Auto Property to True.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following section demonstrates how to create a sample project that modifies properties of Markers on an MSChart control.

Step-by-Step Example

  1. Start a new Standard EXE project. Form1 is created by default.

  2. Click Components on the Project menu, and then check "Microsoft Chart Control."

  3. Add an MSChart control and a CommandButton to Form1.

  4. Set the ChartType property of the MSChart control to 3- vtChChartType2dLine.

  5. Add the following code to Form1:

          Option Explicit
          Private Sub Command1_Click()
    
             Dim x As Integer, y As Integer
    
             MSChart1.RowCount = 10
             MSChart1.ColumnCount = 4
    
             For y = 1 To 4
                MSChart1.Column = y
                For x = 1 To 10
                    MSChart1.Row = x
                    MSChart1.Data = x * y
                Next x
    
                With MSChart1.Plot.SeriesCollection.Item(y)
                   'The next line is required to change the Marker properties.
                   .SeriesMarker.Auto = False
                   .DataPoints.Item(-1).Marker.Visible = True
                   .DataPoints.Item(-1).Marker.Size = 20
                   .DataPoints.Item(-1).Marker.Style = VtMarkerStyleStar
                   .DataPoints.Item(-1).Marker.FillColor.Automatic = False
                   .DataPoints.Item(-1).Marker.FillColor.Set 0, 0, 255
                End With
    
             Next y
          End Sub
    
    

  6. Press the F5 key to run the project.

  7. Click Command1. Note that the Marker style and size do not change.

REFERENCES

The Microsoft Chart control is based on First Impressions by Visual Components. You can obtain a trial or full version of First Impressions at the following web site:

    http://www.visualcomp.com/products/fi.htm

First Impressions is manufactured by Visual Components, a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability.


Additional query words: graph chart ms chart data markers
Keywords : vb5all VBKBAX VBKBComp VBKBCtrl
Version : WINDOWS:5.0
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.