FIG echarts of pie, each block color adjustment

Today, generate a variety of charts in learning to use echarts.

Then appear when using pie chart no matter how I change the code in color, the color pie chart in each block are very similar, almost impossible to distinguish the difference between the blocks, as shown below:

In the figure below, in addition to which one is red, the other is very similar to white, then no matter how I change the rgb values ​​of code, almost no impact on this figure of primary colors

 

However, when I refer to the official code echarts case to write, eventually change was similar to the centimeter level, and normally there should not be a problem ah: Customized Pie

Finally, the positioning of the code where the problem was found, the main problem is visualMap this configuration, the official code is as follows

 

In my position, find min and max values ​​and color spans are related, while the value of your incoming data and also relevant. Here are 80 and 600 means that it will specify the color from light to dark is divided into 540 levels

Since the official data is distributed more evenly, but also all values ​​comprised between 80 to 600, the color transition is obvious to FIG.

 

And my data distribution is very uneven value from 407-14329. Of which only 407 are between 80-600, and all other cross-border (cross-border should all be handled as a maximum value of 600), so this leads me to the Pie chart only 2-3 this one is red, the other is very similar white.

 

So since found the problem, then I can transfer large difference between min and max it a point to show results

First, the large difference is changed to 10000, the effect is significant. But why would it appear white? Because provided colorLightness bright color, the inside of 1 to 0.5, then it will find a full turns red

 

However, a single red does not look good, so I want to add color, first comment out the itemStyle color inside, and then add in visualMap color, the color of rgb random selection of two 233,333

 

Finally see the effect, the color of the block is not obvious ah

 

Source  https://www.cnblogs.com/kumu/p/9515169.html

https://wenku.baidu.com/view/79fc10914128915f804d2b160b4e767f5bcf804b.html

 

Guess you like

Origin www.cnblogs.com/huandong963/p/11231156.html