Home > Asp.net MVC > Format of data from controller to set different colors for each column in highcharts

Format of data from controller to set different colors for each column in highcharts

If there is case where it is necessary to distinguish data based on color e.g if data is below specified number it should be in red color and above it in green color. In that case data to the highcharts should be with color code.

In method getColor1(int a), you can specify the condition to get specific color code:

Finally, set highcharts series value to values1.ToArray()

This Article is TAGGED in , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">