Solved

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

Posted on 2015-01-20
3
505 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
[X]
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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

695 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