{"id":1357,"date":"2012-04-27T18:30:41","date_gmt":"2012-04-27T18:30:41","guid":{"rendered":"http:\/\/galhano.com\/blog\/?p=1357"},"modified":"2016-02-01T18:25:57","modified_gmt":"2016-02-01T18:25:57","slug":"highcharts-net-with-vb-sample","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=1357","title":{"rendered":"Highcharts .Net (with vb sample)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"http:\/\/download.codeplex.com\/Download?ProjectName=highcharts&amp;DownloadId=157874&amp;Build=18696\" alt=\"\" width=\"343\" height=\"69\" \/>Highcharts .Net is a charts library written in pure javascript, offering an easy way to add complex charts to your Web application. Highcharts .Net encapsulates the Highcharts API on ASP.net controls making it easier to use.<\/p>\n<p>Project page at codeplex: <a href=\"http:\/\/highcharts.codeplex.com\/\" target=\"_blank\">http:\/\/highcharts.codeplex.com<\/a><\/p>\n<p>You can see some Highcharts.Net examples at this link: <a href=\"http:\/\/highcharts.paulovich.com.br\/\">http:\/\/highcharts.paulovich.com.br\/<\/a><\/p>\n<p><strong>Install:<\/strong><\/p>\n<p>After download the newest release, add it as reference on your web application, and then add it to the page controls on your <strong>web.config:<\/strong><\/p>\n<p>[xml]<br \/>\n&lt;pages controlRenderingCompatibilityVersion=&quot;3.5&quot; clientIDMode=&quot;AutoID&quot;&gt;<br \/>\n&lt;controls&gt;<br \/>\n&lt;add tagPrefix=&quot;highchart&quot; namespace=&quot;Highchart.UI&quot; assembly=&quot;Highchart&quot;\/&gt;<br \/>\n&lt;\/controls&gt;<br \/>\n&lt;\/pages&gt;<br \/>\n[\/xml]<\/p>\n<p>After that, you only need to import the jQuery script.<\/p>\n<p>[xml]&lt;script src=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.3.2\/jquery.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;[\/xml]<\/p>\n<p>it&#8217;s ready to use \ud83d\ude09<\/p>\n<p>aspx:<\/p>\n<p>[xml] <\/p>\n<p>&lt;highchart:columnchart id=&quot;hcVendas&quot; width=&quot;600&quot; height=&quot;400&quot; runat=&quot;server&quot;&gt;&lt;\/highchart:columnchart&gt;<\/p>\n<p>[\/xml]<\/p>\n<p><strong>VB Sample:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.galhano.com\/blog\/wp-content\/uploads\/2012\/04\/HighCharts01.jpg\" alt=\"\" width=\"564\" height=\"375\" \/><\/p>\n<p><strong><br \/>\n<\/strong><\/p>\n<p><!--more--><\/p>\n<p>[vbnet]<\/p>\n<p>Imports Highchart.Core<br \/>\nPartial Class Teste01<br \/>\nInherits System.Web.UI.Page<\/p>\n<p>Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load<\/p>\n<p>&#8216;Eixo Y&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nDim YItem As New YAxisItem<br \/>\nWith YItem<br \/>\nDim tituloY As New Highchart.Core.Title(&amp;quot;EIXO Y&amp;quot;)<br \/>\nYItem.title = tituloY<br \/>\nhcVendas.YAxis.Add(YItem)<br \/>\nEnd With<\/p>\n<p>&#8216;Eixo X&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nDim XItem As New XAxisItem<br \/>\nWith XItem<br \/>\nDim tituloX As New Highchart.Core.Title(&amp;quot;EIXO X&amp;quot;)<br \/>\nXItem.title = tituloX<br \/>\nDim categorias As Array = {&amp;quot;1994&amp;quot;, &amp;quot;1995&amp;quot;, &amp;quot;1996&amp;quot;, &amp;quot;1997&amp;quot;, &amp;quot;1998&amp;quot;, &amp;quot;1999&amp;quot;, &amp;quot;2000&amp;quot;, &amp;quot;2001&amp;quot;, &amp;quot;2002&amp;quot;}<br \/>\nXItem.categories = categorias<br \/>\nhcVendas.XAxis.Add(XItem)<br \/>\nEnd With<\/p>\n<p>&#8216;New data collection &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nDim series As New Highchart.Core.SerieCollection<\/p>\n<p>Dim serie1 As New Highchart.Core.Data.Chart.Serie<br \/>\nserie1.data = {400, 435, 446, 479, 554, 634, 687, 750, 831}<br \/>\nserie1.type = RenderType.line<br \/>\nserie1.name = &amp;quot;name of\u00a0 serie 1&amp;quot;<br \/>\n&#8216;serie1.color = &amp;quot;khaki&amp;quot;<br \/>\nseries.Add(serie1)<\/p>\n<p>Dim serie2 As New Highchart.Core.Data.Chart.Serie<br \/>\nserie2.data = {500, 200, 250, 300, 450, 400, 600, 150, 200}<br \/>\nserie2.type = RenderType.areaspline<br \/>\nserie2.name = &amp;quot;name of\u00a0 serie 2&amp;quot;<br \/>\nseries.Add(serie2)<\/p>\n<p>&#8216;bind<br \/>\nhcVendas.DataSource = series<br \/>\nhcVendas.DataBind()<\/p>\n<p>End Sub<br \/>\nEnd Class<\/p>\n<p>[\/vbnet]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Highcharts .Net is a charts library written in pure javascript, offering an easy way to add complex charts to your Web application. Highcharts .Net encapsulates the Highcharts API on ASP.net controls making it easier to use. Project page at codeplex: http:\/\/highcharts.codeplex.com You can see some Highcharts.Net examples at this link: http:\/\/highcharts.paulovich.com.br\/ Install: After download the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,139,137],"tags":[170,202,138,203],"class_list":["post-1357","post","type-post","status-publish","format-standard","hentry","category-netfx","category-charts","category-jquery","tag-aspnet","tag-charts","tag-jquery-2","tag-vb","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1357"}],"version-history":[{"count":18,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357\/revisions"}],"predecessor-version":[{"id":2004,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1357\/revisions\/2004"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}