ASPGoogleCharts
1.0.0
Google Charts JS API 的經典 ASP 包裝器
使用 Google Charts API 以簡單的方式產生圖表。
使用簡單:
dim chart
set chart = new GoogleCharts
chart.type = CHART_COLUMN
chart.title = "Friday Night Pizza"
chart.addColumn CTYPE_STRING, "Type"
chart.addColumn CTYPE_NUMBER, "Qty"
chart.addColumn CTYPE_NUMBER, "Price"
chart.addRow Array("Peperony", 2, 1.2)
chart.addRow Array("Marguerita", 1, 3.5)
chart.addRow Array("Bacon", 4, 2.25)
chart.draw
接受從二維數組載入數據,例如ADODB Recordset
的GetRows()
方法提供的數據:
dim chart
set chart = new GoogleCharts
chart.type = CHART_COLUMN
chart.title = "Friday Night Pizza"
chart.addColumn CTYPE_STRING, "Type"
chart.addColumn CTYPE_NUMBER, "Qty"
chart.addColumn CTYPE_NUMBER, "Price"
dim rs
set rs = createObject("ADODB.Recordset")
rs.open "SQL HERE", yourConnection, 0, 1
chart.loadArray rs.getRows()
chart.draw
set rs = nothing
它還可以從Recordset
載入資料:
dim chart
set chart = new GoogleCharts
chart.type = CHART_COLUMN
chart.title = "Friday Night Pizza"
dim rs
set rs = createObject("ADODB.Recordset")
rs.open "SQL HERE", yourConnection, 0, 1
' No need to declare columns. It gets the type and label from the `Recordset.Fields` property.
chart.loadRecordSet rs
chart.draw
set rs = nothing
麻省理工學院許可證 (MIT) 版權所有 (c) 2012 RCDMK - rcdmk[at]hotmail[dot]com
特此免費授予任何獲得本軟體及相關文件文件(「軟體」)副本的人不受限制地使用本軟體,包括但不限於使用、複製、修改、合併的權利、發布、散佈、再授權和/或銷售軟體的副本,並允許向其提供軟體的人員這樣做,但須滿足以下條件:
上述版權聲明和本授權聲明應包含在本軟體的所有副本或主要部分中。目的且不侵權。 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE軟體.