[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2015-01-20
3
Medium Priority
?
596 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

873 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