Whalensdad
Posts: 56
Joined: Tue Jun 01, 2021 4:14 pm

Is there More In-Depth Documentation for the .Net Implementation of Highcharts?

Rather than post a million questions in this forum, is there more extensive documentation available for implementing HighCharts in a .Net application. I've looked at the following, but it is lacking.
https://dotnet.highcharts.com/Help/Highcharts/html/
https://dotnet.highcharts.com/Highcharts/Demo

Specifically, the above documentation only shows how to utilize the most basic functionality. It barely shows how to do any sort of styling.
Example #1: I couldn't get a border around the chart using "bordercolor" or "borderwidth". I had to resort to setting stylemode to true and using css.

Example #2: I can't find how to style the font for the title. The Title Style object is a hashtable.

Code: Select all

public Hashtable Style { get; set; }

How do I add the fontsize, font, etc to this?

Example #3: I can't add a gradient to the plot background directly. I had to utilize the following code, which I found after hours of searching online:

Code: Select all

<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
    <style type="text/css">
        .table1 .highcharts-background {
            stroke: black;
            stroke-width: 2px;
        }
        .table1 .highcharts-plot-border {
            stroke-width: 1px;
            stroke: gray;
        }

        .table1 .highcharts-plot-background {
            fill: url(#MyGradient)
        }
    </style>
    <defs>
        <linearGradient id="MyGradient" x1="0%" y1="100%" x2="100%" y2="0%">
            <stop offset="0%" stop-color="#02f512" />
            <stop offset="30%" stop-color="#F2E95D" />
            <stop offset="70%" stop-color="#F2E95D" />
            <stop offset="100%" stop-color="#f50202" />
        </linearGradient>
    </defs>
</svg>
Example #4: This chart does not have any code:https://dotnet.highcharts.com/Highchart ... me=default

Example 5: None of the example charts have any formatting applied other than what you can directly access.

If not, is there a more direct approach to getting .Net implementation questions answered?
Whalensdad
Posts: 56
Joined: Tue Jun 01, 2021 4:14 pm

Re: Is there More In-Depth Documentation for the .Net Implementation of Highcharts?

An edit to example #2. I'm trying to style the xAxisTitle and yAxisTitle. I can style the chart title by using css in stylemode.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Is there More In-Depth Documentation for the .Net Implementation of Highcharts?

Hello Whalensdad,

I have forwarded your questions to our .net developer and I will be back with an answer.

Best regards!
Hubert Kozik
Highcharts Developer
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Is there More In-Depth Documentation for the .Net Implementation of Highcharts?

Hello Whalensdad,

#1. You can set a borderWidth of chart by using this line of code

Code: Select all

chart.BorderWidth = 2;
#2. An example of using styles from Hashtable:

Code: Select all

Style = new Hashtable(){ { "fontSize", "0.8em" } }
The first value of the element is the name of the attribute and the second value is its value.

xAxisTitle and yAxisTitle contains the Style property and you can use it same as above.

#3. Actually the only option is to set a solid color using BackgroundColor.

#4. It will be fixed asap.

#5. I don't fully understand what you mean, could you explain it to me more precisely?

Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”