最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Color each point individually in column chart highcharts - Stack Overflow

programmeradmin2浏览0评论

I have a highchart as shown in the fiddle

series: [{
                data: [
                    [ 'Actual Wishlist Requests' , 6000], 
                    [ 'Actual Approved Wishlists', 3000], 
                    [ 'Actual Research Completed', 2000], 
                    [ 'Actual Interviews Scheduled', 1000], 
                    [ 'Actual Successful Interviews', 500], 
                    [ 'Actual Contracts Signed', 50]] 
            }, 
                 { 
                     data: [
                     [ 'Target Wishlist Requests' , 9305 ], 
                     [ 'Target Approved Wishlists', 6557], 
                     [ 'Target Research Completed', 5069], 
                     [ 'Target Interviews Scheduled', 2290], 
                     [ 'Target Successful Interviews', 686], 
                     [ 'Target Contracts Signed', 37]]
            }]

/

I want to color each point with an individual color.

How can i do this with the existing chart?

Thanks Abhishek

I have a highchart as shown in the fiddle

series: [{
                data: [
                    [ 'Actual Wishlist Requests' , 6000], 
                    [ 'Actual Approved Wishlists', 3000], 
                    [ 'Actual Research Completed', 2000], 
                    [ 'Actual Interviews Scheduled', 1000], 
                    [ 'Actual Successful Interviews', 500], 
                    [ 'Actual Contracts Signed', 50]] 
            }, 
                 { 
                     data: [
                     [ 'Target Wishlist Requests' , 9305 ], 
                     [ 'Target Approved Wishlists', 6557], 
                     [ 'Target Research Completed', 5069], 
                     [ 'Target Interviews Scheduled', 2290], 
                     [ 'Target Successful Interviews', 686], 
                     [ 'Target Contracts Signed', 37]]
            }]

http://jsfiddle/Sq8fq/1/

I want to color each point with an individual color.

How can i do this with the existing chart?

Thanks Abhishek

Share Improve this question asked Dec 20, 2013 at 6:20 vishalvishal 2076 silver badges20 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

You can specify lots of attributes at the point level, including color. Try something like this:

series: [{
      data: [
             {y:6000,color:'red'}, 

http://jsfiddle/G575t/

You can also use the colorByPoint option, depending on the level of control needed:

  • http://jsfiddle/jlbriggs/Sq8fq/2/
  • http://api.highcharts./highcharts#plotOptions.column.colorByPoint
发布评论

评论列表(0)

  1. 暂无评论