Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I set PlotOptions in Highcharts using asp.net vb

Posted on 2015-01-20
3
465 Views
Last Modified: 2015-01-24
Using the Highchart.dll I can display graphs of data and set options for the axes and titles, but cannot find the code to set options for the plot area (eg background colour etc).

Can someone provide the code to set PlotOptions? My test page source is attached.
zztestHighchartSQL.aspx
0
Comment
Question by:slimguy
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40561313
Hi,
what .Net library are you using? Highcharts is normally "just" a Javascript library - so client side only. It seems that you are using an .NET wrapper - but which one? Without knowing your referenced 3rd party DLLs we cannot know which methods and properties they support.
I only found DotNet.Highcharts on Codeplex - but their namespace has a different signature (so that library has a SetPlotOptions method).

Thanks.
Rainer
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40561332
Hi,
I think I found your referenced DLL - its Hightchart.NET on Codeplex :-)
As far as I can see, you have to create a new object
Hightchart.Core.Appearance
where you can set a lot of options (background, class, ...)
Dim myChartAppearance As Highchart.Core.Appearance
myChartAppearance = New Highchart.Core.Appearance()
myChartAppearance.backgroundColor = "#DDDDDD"
myChartAppearance.className = "csstest"

Open in new window

Then simply set the appearance on your chart object like
hcVendas.Appearance = myChartAppearance

Open in new window

HTH
Rainer
0
 

Author Closing Comment

by:slimguy
ID: 40568439
Thanks, that pointed me in the right direction. Sample code that I found to work is:

Dim myChartAppearance As Highchart.Core.Appearance.Appearance
        myChartAppearance = New Highchart.Core.Appearance.Appearance
        myChartAppearance.borderWidth = 5
        myChartAppearance.borderColor = "blue"
        myChartAppearance.borderRadius = 50
       
        hcVendas.Appearance = myChartAppearance
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
encoding an href string 2 24
jquery datatables, asp.net MVC 9 51
Client Validating 2 date fields, required & comparison 1 42
Why use this lambda? 12 37
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question