Solved

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

Posted on 2015-01-20
3
451 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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 …

803 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