owc-Chart with m$ control series in HTML

Source: Internet
Author: User
Control | chart <object id=chartspace1 classid=clsid:0002e500-0000-0000-c000-000000000046 style= "width:100%;height:350" ></object>
<script language= "VBSCRIPT" >
SUB Window_onload ()
Dim categories (3), VALUES (3)

' Gets the named constant object, which is used in future scripts
Set C = chartspace1.constants

' Set chart workspace title
Chartspace1.haschartspacetitle = True
ChartSpace1.ChartSpaceTitle.Caption = "Chart space Title"

' Set the legend for the chart workspace
ChartSpace1.HasChartSpaceLegend = True

' Legend position, where c.* is the position enumeration value, and the value list is as follows
' Chlegendpositiontop: Top
' Chlegendpositionleft: Left
' Chlegendpositionright: Right
' Chlegendpositionbottom: Bottom
' Chlegendpositionautomatic: Automatic
ChartSpace1.ChartSpaceLegend.Position = C.chlegendpositionright

Categories (0) = "White"
Categories (1) = "BLACK"
Categories (2) = "Asian"
Categories (3) = "Latino"

' Add a chart to the chart workspace
ChartSpace1.Charts.Add

' Adds a new series to the chart workspace in the specified chart, below
Set a = chartspace1.charts (0). SeriesCollection.Add
' Specifies the type of the new series, c.* as the type enumeration value, and the list is as follows:
' Chcharttypecombo
' chChartTypeColumnClustered
' Chcharttypecolumnstacked
' ChChartTypeColumnStacked100
' Chcharttypebarclustered
' Chcharttypebarstacked
' ChChartTypeBarStacked100
' Chcharttypeline
' Chcharttypelinemarkers
' Chcharttypelinestacked
' Chcharttypelinestackedmarkers
' ChChartTypeLineStacked100
' Chcharttypelinestacked100markers
' Chcharttypesmoothline
' Chcharttypesmoothlinemarkers
' Chcharttypesmoothlinestacked
' Chcharttypesmoothlinestackedmarkers
' ChChartTypeSmoothLineStacked100
' Chcharttypesmoothlinestacked100markers
' Chcharttypepie
' Chcharttypepieexploded
' Chcharttypepiestacked
' Chcharttypescattermarkers
' Chcharttypescattersmoothlinemarkers
' Chcharttypescattersmoothline
' Chcharttypescatterlinemarkers
' Chcharttypescatterline
' Chcharttypescatterlinefilled
' Chcharttypebubble
' Chcharttypebubbleline
' Chcharttypearea
' Chcharttypeareastacked
' ChChartTypeAreaStacked100
' Chcharttypedoughnut
' Chcharttypedoughnutexploded
' Chcharttyperadarline
' Chcharttyperadarlinemarkers
' Chcharttyperadarlinefilled
' Chcharttyperadarsmoothline
' Chcharttyperadarsmoothlinemarkers
' CHCHARTTYPESTOCKHLC
' CHCHARTTYPESTOCKOHLC
' Chcharttypepolarmarkers
' Chcharttypepolarline
' Chcharttypepolarlinemarkers
' Chcharttypepolarsmoothline
' Chcharttypepolarsmoothlinemarkers
' A total of 47, who are interested in one by one who try it, I'm lazy.
' Type is different, the supported method also differs, this article is aimed at chcharttypecolumnclustered.
A.type = c.chcharttypecolumnclustered

Chartspace1.charts (0). SeriesCollection.Add
Chartspace1.charts (0). SeriesCollection.Add

VALUES (0) = 0.2
VALUES (1) = 0.06
VALUES (2) = 0.17
VALUES (3) = 0.13

' Set the name of the series, which will be displayed in the legend, below
Chartspace1.charts (0). SeriesCollection (0). Caption = "Perot"
' Set the name of the species, hereinafter
Chartspace1.charts (0). SeriesCollection (0). SetData c.chdimcategories, C.chdataliteral, categories
' Set the value of the series, below
Chartspace1.charts (0). SeriesCollection (0). SetData c.chDimValues, C.chdataliteral, values

VALUES (0) = 0.38
VALUES (1) = 0.82
VALUES (2) = 0.28
VALUES (3) = 0.62

Chartspace1.charts (0). SeriesCollection (1). Caption = "Clinton"
Chartspace1.charts (0). SeriesCollection (1). SetData c.chdimcategories, C.chdataliteral, categories
Chartspace1.charts (0). SeriesCollection (1). SetData c.chDimValues, C.chdataliteral, values

VALUES (0) = 0.42
VALUES (1) = 0.12
VALUES (2) = 0.55
VALUES (3) = 0.25

Chartspace1.charts (0). SeriesCollection (2). Caption = "Bush"
Chartspace1.charts (0). SeriesCollection (2). SetData c.chdimcategories, C.chdataliteral, categories
Chartspace1.charts (0). SeriesCollection (2). SetData c.chDimValues, C.chdataliteral, values

' Sets the starting and formatting of the specified axis, string type
' Where the c.* is an enumerated value of the axis type, and the value list is as follows:
' chAxisPositionLeft
' Chaxispositioncircular
' Chaxispositionradial
' Chaxispositionright
' Chax



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.