Table of Contents
dim html As New StringBuilder html.Append("") html.Append("") html.Append("") html.AppendFormat("", Application.StartupPath.Replace("\\", "/")) html.Append("") html.Append("FusionCharts.ready(function () {") html.Append("var revenueChart = new FusionCharts({") html.Append("type: 'column2d',") html.Append("renderAt: 'chart-container',") html.Append("width: '500',") html.Append("height: '200',") html.Append("dataFormat: 'xml',") html.Append("dataSource: "" <chart caption='Monthly' xAxisName='Month' yAxisName='Revenue' numberPrefix='$' showValues='0'><set label='Jan' value='420000' /><set label='Feb' value='910000' /><set label='Mar' value='720000' /><set label='Apr' value='550000' /><set label='May' value='810000' /><set label='Jun' value='510000' /><set label='Jul' value='680000' /><set label='Aug' value='620000' /><set label='Sep' value='610000' /><set label='Oct' value='490000' /><set label='Nov' value='530000' /><set label='Dec' value='330000' /></chart> "" ") html.Append("});") html.Append("revenueChart.render();") html.Append("});") html.Append("") html.Append("") html.Append("") html.Append("<div id='chart-container' align='center'></div>") html.Append("") html.Append("") WebBrowser1.DocumentText = html.ToString()
<!DOCTYPE html> <html lang="en" xmlns="https://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Rendering FusionCharts</title> <script src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script> <script> FusionCharts.ready(function () { var cSatScoreChart = new FusionCharts({ type: 'angulargauge', renderAt: 'chart-container', width: '400', height: '300', dataFormat: 'json', dataSource: { "chart": { "caption": "Average Customer Satisfaction Score", "subcaption": "Last year vs Current year", "lowerLimit": "0", "upperLimit": "100", "gaugeFillMix": "{dark-40},{light-40},{dark-20}", "theme": "fint", "majorTMAlpha": "0", "minorTMAlpha": "0" }, "colorRange": { "color": [ { "minValue": "0", "maxValue": "50", "code": "#e44a00" }, { "minValue": "50", "maxValue": "75", "code": "#f8bd19" }, { "minValue": "75", "maxValue": "100", "code": "#6baa01" } ] }, "dials": { "dial": [ { "value": "78", "showValue": "1", "tooltext": "Current year's average : $value", "rearExtension": "15" } ] } } }).render(); }); </script> </head> <body> <div id="chart-container">FusionCharts will render here</div> </body> </html>
WebBrowser1.Navigate(AppDomain.CurrentDomain.BaseDirectory.Replace("bin\Debug\", "HTMLPage1.html"))
Imports System.Text Imports FusionCharts.Charts Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim Data As String Data = "<chart caption='Sales of Liquor' subcaption='Last week' xaxisname='Day' yaxisname='Sales (In USD)' numberprefix='$' palettecolors='#0075c2' bgcolor='#ffffff' showborder='0' showcanvasborder='0' plotborderalpha='10' useplotgradientcolor='0' plotfillalpha='50' showxaxisline='1' axislinealpha='25' divlinealpha='10' showvalues='1' showalternatehgridcolor='0' captionfontsize='14' subcaptionfontsize='14' subcaptionfontbold='0' tooltipcolor='#ffffff' tooltipborderthickness='0' tooltipbgcolor='#000000' tooltipbgalpha='80' tooltipborderradius='2' tooltippadding='5'><set label='Mon' value='4123' /><set label='Tue' value='4633' /><set label='Wed' value='5507' /><set label='Thu' value='4910' /><set label='Fri' value='5529' /><set label='Sat' value='5803' /><set label='Sun' value='6202' /></chart>" Dim factoryOutput As New Chart("area2d", "myChart", "600", "350", "xml", Data) Dim Total As New StringBuilder Total.Append("<html xmlns='https://www.w3.org/1999/xhtml'>") Total.Append("<head>") Total.Append("<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />") Total.AppendFormat("<script type='text/javascript' src='https://static.fusioncharts.com/code/latest/fusioncharts.js?cacheBust=8232'></script>", Application.StartupPath.Replace("\\", "/")) Total.Append("<body>") Dim chartdata As String chartdata = factoryOutput.Render() Total.Append(chartdata) Total.Append("</body>") Total.Append("</html>") WebBrowser1.DocumentText = Total.ToString() End Sub End Class
Ever had a data set that seemed more complicated than a Rubik's cube? You’re not…
We’ve all seen them in textbooks or presentations—those overlapping circles that simplify complex information into…
We’re excited to announce the upcoming release of FusionCharts v4.1—a groundbreaking step forward in the…
Have you ever been overwhelmed by a massive data set and wondered, "How do I…
If you’ve ever tried to make sense of the stock market, you’ve probably come across…
Imagine you’re comparing the sales performance of your top product lines across different regions, or…
View Comments
Hi,
I'm trying to use the real-time line chart in vb.net. How can I get a reference to the chart in order to send updates.
Thanks,
John