You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/09/02 07:53:51 UTC

[GitHub] [incubator-echarts] quillblue commented on issue #13217: visualMap低于min时颜色的配置

quillblue commented on issue #13217:
URL: https://github.com/apache/incubator-echarts/issues/13217#issuecomment-685422542


   @Etienne-Treville please use outRange to implement this [https://echarts.apache.org/zh/option.html#visualMap-piecewise.outOfRange](https://echarts.apache.org/zh/option.html#visualMap-piecewise.outOfRange)
   
   Code below provide an example of this option
   `option = {
     tooltip: {},
     xAxis: {
       type: "category",
       data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
     },
     yAxis: {
       type: "category",
       data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
     },
     visualMap: {
       type: "piecewise",
       splitNumber: 8,
       min: 30,
       max: 100,
       calculable: true,
       realtime: false,
       inRange: {
         color: ["#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf", "#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"]
       },
       outOfRange:{
           color:['#000']
       }
     },
     series: [{
       name: "Gaussian",
       type: "heatmap",
       data: [
         [0, 0, 50],
         [0, 1, 50],
         [0, 2, 50],
         [0, 3, 50],
         [0, 4, 50],
         [0, 5, 50],
         [0, 6, 50],
         [0, 7, 50],
         [0, 8, 50],
         [0, 9, 50],
         [0, 10, 50],
         [0, 11, 50],
         [0, 12, 50],
         [0, 13, 50],
         [0, 14, 50],
         [0, 15, 50],
         [0, 16, 50],
         [0, 17, 50],
         [0, 18, 50],
         [0, 19, 50],
         [0, 20, 50],
         [1, 0, 54.994209375000004],
         [1, 1, 54.98855287535156],
         [1, 2, 54.983669047750006],
         [1, 3, 54.980227686550776],
         [1, 4, 54.978760914000006],
         [1, 5, 54.97964233398438],
         [1, 6, 54.983074003125],
         [1, 7, 54.98908121921484],
         [1, 8, 54.997515127],
         [1, 9, 55.00806314130469],
         [1, 10, 55.020267187500004],
         [1, 11, 55.0335497593164],
         [1, 12, 55.047247794],
         [1, 13, 55.0606543648125],
         [1, 14, 55.073068190875],
         [1, 15, 55.08385096435546],
         [1, 16, 55.092492495],
         [1, 17, 55.09868367200781],
         [1, 18, 55.10239724325],
         [1, 19, 55.103976411832036],
         [1, 20, 55.104231250000005],
         [2, 0, 59.9144],
         [2, 1, 59.87254178725],
         [2, 2, 59.83612736],
         [2, 3, 59.80991875325],
         [2, 4, 59.797737472],
         [2, 5, 59.80230078125],
         [2, 6, 59.825115776000004],
         [2, 7, 59.866431231250004],
         [2, 8, 59.925247232000004],
         [2, 9, 59.999382583250004],
         [2, 10, 60.08560000000001],
         [2, 11, 60.17978907725],
         [2, 12, 60.27720704],
         [2, 13, 60.37277727325],
         [2, 14, 60.461445632],
         [2, 15, 60.53859453125],
         [2, 16, 60.60051481600001],
         [2, 17, 60.64493541125],
         [2, 18, 60.67161075200001],
         [2, 19, 60.68296599325001],
         [2, 20, 60.6848],
         [3, 0, 64.60082187500001],
         [3, 1, 64.4705362889961],
         [3, 2, 64.35634390175],
         [3, 3, 64.27246293910156],
         [3, 4, 64.230427154],
         [3, 5, 64.23854693603516],
         [3, 6, 64.301550051125],
         [3, 7, 64.42040201135937],
         [3, 8, 64.592306075],
         [3, 9, 64.81088287663673],
         [3, 10, 65.0665296875],
         [3, 11, 65.34695930592969],
         [3, 12, 65.637918578],
         [3, 13, 65.92408654830078],
         [3, 14, 66.190152240875],
         [3, 15, 66.4220720703125],
         [3, 16, 66.60850688299999],
         [3, 17, 66.74243862852734],
         [3, 18, 66.82296666124999],
         [3, 19, 66.85728367200781],
         [3, 20, 66.86283125],
         [4, 0, 68.8416],
         [4, 1, 68.557701681],
         [4, 2, 68.30702156800001],
         [4, 3, 68.11922918100001],
         [4, 4, 68.01867264],
         [4, 5, 68.023140625],
         [4, 6, 68.143015296],
         [4, 7, 68.380816173],
         [4, 8, 68.731134976],
         [4, 9, 69.180961425],
         [4, 10, 69.7104],
         [4, 11, 70.29377766100001],
         [4, 12, 70.90114252800001],
         [4, 13, 71.50015352100002],
         [4, 14, 72.05836096],
         [4, 15, 72.545878125],
         [4, 16, 72.938443776],
         [4, 17, 73.22087563299999],
         [4, 18, 73.39091481599999],
         [4, 19, 73.46346124499999],
         [4, 20, 73.4752],
         [5, 0, 72.412109375],
         [5, 1, 71.90412197265626],
         [5, 2, 71.45227109375],
         [5, 3, 71.10730203857422],
         [5, 4, 70.91138125],
         [5, 5, 70.89576721191406],
         [5, 6, 71.07918007812499],
         [5, 7, 71.46687003173828],
         [5, 8, 72.050384375],
         [5, 9, 72.80803334960937],
         [5, 10, 73.7060546875],
         [5, 11, 74.70047689208985],
         [5, 12, 75.73968125],
         [5, 13, 76.76766257324219],
         [5, 14, 77.72798867187501],
         [5, 15, 78.5684585571289],
         [5, 16, 79.246459375],
         [5, 17, 79.73502207031248],
         [5, 18, 80.02957578124999],
         [5, 19, 80.15540096435545],
         [5, 20, 80.17578125],
         [6, 0, 75.10759999999999],
         [6, 1, 74.306365026875],
         [6, 2, 73.588477184],
         [6, 3, 73.030288488875],
         [6, 4, 72.69610342399999],
         [6, 5, 72.634326171875],
         [6, 6, 72.87470864],
         [6, 7, 73.426699275875],
         [6, 8, 74.278892672],
         [6, 9, 75.399579960875],
         [6, 10, 76.7384],
         [6, 11, 78.229091346875],
         [6, 12, 79.79334502399999],
         [6, 13, 81.345758073875],
         [6, 14, 82.79988790399999],
         [6, 15, 84.075407421875],
         [6, 16, 85.10636096],
         [6, 17, 85.85052099087498],
         [6, 18, 86.299845632],
         [6, 19, 86.49203694087497],
         [6, 20, 86.5232],
         [7, 0, 76.769071875],
         [7, 1, 75.61228988726954],
         [7, 2, 74.56835686375],
         [7, 3, 73.74219509090625],
         [7, 4, 73.223470242],
         [7, 5, 73.08077093505861],
         [7, 6, 73.357375684125],
         [7, 7, 74.06860724378906],
         [7, 8, 75.20077434699999],
         [7, 9, 76.71170083616016],
         [7, 10, 78.53284218750001],
         [7, 11, 80.57298942873437],
         [7, 12, 82.72356045],
         [7, 13, 84.86547870807422],
         [7, 14, 86.877639323875],
         [7, 15, 88.64696257324218],
         [7, 16, 90.080034771],
         [7, 17, 91.11633654830075],
         [7, 18, 91.74305852324999],
         [7, 19, 92.01150436481247],
         [7, 20, 92.05508124999999],
         [8, 0, 77.30239999999999],
         [8, 1, 75.739096288],
         [8, 2, 74.318210048],
         [8, 3, 73.17437552],
         [8, 4, 72.42448998399999],
         [8, 5, 72.1595],
         [8, 6, 72.43833036800001],
         [8, 7, 73.283955808],
         [8, 8, 74.68161536],
         [8, 9, 76.579169504],
         [8, 10, 78.8896],
         [8, 11, 81.495652448],
         [8, 12, 84.256621568],
         [8, 13, 87.0172792],
         [8, 14, 89.618945024],
         [8, 15, 91.9127],
         [8, 16, 93.774742528],
         [8, 17, 95.12388732799997],
         [8, 18, 95.94120704],
         [8, 19, 96.29181654399996],
         [8, 20, 96.3488],
         [9, 0, 76.690709375],
         [9, 1, 74.68461634627343],
         [9, 2, 72.84836233175],
         [9, 3, 71.34554847203516],
         [9, 4, 70.32070372999999],
         [9, 5, 69.88829931640626],
         [9, 6, 70.124509509125],
         [9, 7, 71.06171886594922],
         [9, 8, 72.685775831],
         [9, 9, 74.93599273472657],
         [9, 10, 77.70789218750001],
         [9, 11, 80.85869986680079],
         [9, 12, 84.21558369799999],
         [9, 13, 87.58663942873439],
         [9, 14, 90.774622596875],
         [9, 15, 93.59342689208985],
         [9, 16, 95.88730891100002],
         [9, 17, 97.55285930592964],
         [9, 18, 98.56372032724998],
         [9, 19, 98.99804975931636],
         [9, 20, 99.06873125],
         [10, 0, 75],
         [10, 1, 72.5318484375],
         [10, 2, 70.25680000000001],
         [10, 3, 68.36488593749999],
         [10, 4, 67.0272],
         [10, 5, 66.3818359375],
         [10, 6, 66.5232],
         [10, 7, 67.4946984375],
         [10, 8, 69.2848],
         [10, 9, 71.8264734375],
         [10, 10, 75],
         [10, 11, 78.63916093750001],
         [10, 12, 82.5408],
         [10, 13, 86.47776093750001],
         [10, 14, 90.2152],
         [10, 15, 93.5302734375],
         [10, 16, 96.2352],
         [10, 17, 98.20369843749995],
         [10, 18, 99.40079999999998],
         [10, 19, 99.91603593749994],
         [10, 20, 100],
         [11, 0, 72.378021875],
         [11, 1, 69.44673325310546],
         [11, 2, 66.72599725775],
         [11, 3, 64.42817184539844],
         [11, 4, 62.748488433999995],
         [11, 5, 61.847702941894525],
         [11, 6, 61.838750433125],
         [11, 7, 62.77740336915625],
         [11, 8, 64.656933467],
         [11, 9, 67.40677716374609],
         [11, 10, 70.89520468749998],
         [11, 11, 74.93599273472657],
         [11, 12, 79.299100754],
         [11, 13, 83.72535083616017],
         [11, 14, 87.94511121087498],
         [11, 15, 91.70098334960937],
         [11, 16, 94.774492675],
         [11, 17, 97.01678287663667],
         [11, 18, 98.38331383324999],
         [11, 19, 98.9725631413046],
         [11, 20, 99.06873125],
         [12, 0, 69.04639999999999],
         [12, 1, 65.669172041],
         [12, 2, 62.51293567999999],
         [12, 3, 59.807031077],
         [12, 4, 57.767232512],
         [12, 5, 56.57501562499999],
         [12, 6, 56.361431935999995],
         [12, 7, 57.195590644999996],
         [12, 8, 59.077747712],
         [12, 9, 61.937002217],
         [12, 10, 65.6336],
         [12, 11, 69.965844581],
         [12, 12, 74.68161536],
         [12, 13, 79.49449309700002],
         [12, 14, 84.10449267199999],
         [12, 15, 88.223403125],
         [12, 16, 91.60473497600002],
         [12, 17, 94.07827482499994],
         [12, 18, 95.58924723199998],
         [12, 19, 96.24208387699991],
         [12, 20, 96.3488],
         [13, 0, 65.28600937499999],
         [13, 1, 61.497287028703106],
         [13, 2, 57.932315881749986],
         [13, 3, 54.83122884943358],
         [13, 4, 52.425841313999975],
         [13, 5, 50.91555895996092],
         [13, 6, 50.44844821612499],
         [13, 7, 51.10746930434764],
         [13, 8, 52.901871894999985],
         [13, 9, 55.763753369156234],
         [13, 10, 59.549779687499985],
         [13, 11, 64.0480688659492],
         [13, 12, 68.99023705799999],
         [13, 13, 74.06860724378906],
         [13, 14, 78.95858052587498],
         [13, 15, 83.34617003173828],
         [13, 16, 86.96069742300001],
         [13, 17, 89.6126520113593],
         [13, 18, 91.23671248124997],
         [13, 19, 91.93993121921474],
         [13, 20, 92.05508124999999],
         [14, 0, 61.415600000000005],
         [14, 1, 57.264924029125005],
         [14, 2, 53.33296140800001],
         [14, 3, 49.86404046912501],
         [14, 4, 47.100920320000014],
         [14, 5, 45.257486328125005],
         [14, 6, 44.497094816000015],
         [14, 7, 44.91656696612501],
         [14, 8, 46.535831936000015],
         [14, 9, 49.29321918312502],
         [14, 10, 53.04640000000001],
         [14, 11, 57.578978259125016],
         [14, 12, 62.612730368000015],
         [14, 13, 67.82549443412502],
         [14, 14, 72.87470864000001],
         [14, 15, 77.42659882812501],
         [14, 16, 81.19101529600002],
         [14, 17, 83.96191880112494],
         [14, 18, 85.66351577599998],
         [14, 19, 86.40204275312492],
         [14, 20, 86.52320000000002],
         [15, 0, 57.763671875],
         [15, 1, 53.312397229003906],
         [15, 2, 49.06741484375],
         [15, 3, 45.27069145507813],
         [15, 4, 42.17058125],
         [15, 5, 39.99156951904297],
         [15, 6, 38.910067578125],
         [15, 7, 39.03625895996093],
         [15, 8, 40.401996875],
         [15, 9, 42.95475294189453],
         [15, 10, 46.5576171875],
         [15, 11, 50.995349316406255],
         [15, 12, 55.98648125000001],
         [15, 13, 61.20147093505861],
         [15, 14, 66.286907421875],
         [15, 15, 70.89576721191406],
         [15, 16, 74.72372187500001],
         [15, 17, 77.55149693603508],
         [15, 18, 79.29328203124997],
         [15, 19, 80.05119233398428],
         [15, 20, 80.17578125],
         [16, 0, 54.633599999999994],
         [16, 1, 49.950476159999994],
         [16, 2, 45.45472614399999],
         [16, 3, 41.37986803199999],
         [16, 4, 37.974610943999984],
         [16, 5, 35.469999999999985],
         [16, 6, 34.052920319999984],
         [16, 7, 33.84596006399998],
         [16, 8, 34.89363251199998],
         [16, 9, 37.15495718399999],
         [16, 10, 40.50239999999998],
         [16, 11, 44.727172479999986],
         [16, 12, 49.550889983999994],
         [16, 13, 54.643588992000005],
         [16, 14, 59.64810342399998],
         [16, 15, 64.21079999999999],
         [16, 16, 68.01867264],
         [16, 17, 70.84279590399991],
         [16, 18, 72.58813747199996],
         [16, 19, 73.34972966399988],
         [16, 20, 73.47519999999999],
         [17, 0, 52.26200937500006],
         [17, 1, 47.417614852445375],
         [17, 2, 42.73643318375007],
         [17, 3, 38.43829799326961],
         [17, 4, 34.767499282000074],
         [17, 5, 31.957741455078203],
         [17, 6, 30.20367171912508],
         [17, 7, 29.638978849433673],
         [17, 8, 30.32106232700008],
         [17, 9, 32.222271845398524],
         [17, 10, 35.227717187500076],
         [17, 11, 39.13964847203523],
         [17, 12, 43.68840677000008],
         [17, 13, 48.549945090906334],
         [17, 14, 53.36991973887506],
         [17, 15, 57.79435203857428],
         [17, 16, 61.506860431000064],
         [17, 17, 64.27246293910154],
         [17, 18, 65.98795000325003],
         [17, 19, 66.73882768655074],
         [17, 20, 66.86283125000006],
         [18, 0, 50.770400000000016],
         [18, 1, 45.83042317175002],
         [18, 2, 41.02573452800002],
         [18, 3, 36.55840193375003],
         [18, 4, 32.66432614400002],
         [18, 5, 29.57643359375003],
         [18, 6, 27.494561408000028],
         [18, 7, 26.56203463175002],
         [18, 8, 26.84893568000003],
         [18, 9, 28.342066007750034],
         [18, 10, 30.941600000000026],
         [18, 11, 34.46443108175002],
         [18, 12, 38.654210048000024],
         [18, 13, 43.198075613750035],
         [18, 14, 47.75007718400001],
         [18, 15, 51.961289843750016],
         [18, 16, 55.51662156800003],
         [18, 17, 58.178312651749955],
         [18, 18, 59.83612735999999],
         [18, 19, 60.56423779774992],
         [18, 20, 60.68480000000002],
         [19, 0, 50.110021875000086],
         [19, 1, 45.127380337464935],
         [19, 2, 40.24985442175009],
         [19, 3, 35.65901485244542],
         [19, 4, 31.5795074100001],
         [19, 5, 28.24084722900401],
         [19, 6, 25.84595527912511],
         [19, 7, 24.546437028703227],
         [19, 8, 24.424603291000114],
         [19, 9, 25.482233253105584],
         [19, 10, 27.636079687500104],
         [19, 11, 30.720116346273546],
         [19, 12, 34.494527538000106],
         [19, 13, 38.661439887269644],
         [19, 14, 42.88739627687509],
         [19, 15, 46.832571972656346],
         [19, 16, 50.1867329310001],
         [19, 17, 52.71193628899612],
         [19, 18, 54.29197303725006],
         [19, 19, 54.98855287535156],
         [19, 20, 55.10423125000008],
         [20, 0, 50],
         [20, 1, 45.005790624999996],
         [20, 2, 40.0856],
         [20, 3, 35.399178125],
         [20, 4, 31.158399999999997],
         [20, 5, 27.587890625],
         [20, 6, 24.892400000000002],
         [20, 7, 23.230928125],
         [20, 8, 22.6976],
         [20, 9, 23.309290625000003],
         [20, 10, 25],
         [20, 11, 27.621978125000002],
         [20, 12, 30.9536],
         [20, 13, 34.713990625000015],
         [20, 14, 38.58439999999999],
         [20, 15, 42.236328125],
         [20, 16, 45.36640000000001],
         [20, 17, 47.73799062499994],
         [20, 18, 49.22959999999998],
         [20, 19, 49.889978124999914],
         [20, 20, 50]
       ],
       emphasis: {
         itemStyle: {
           borderColor: "#333",
           borderWidth: 1
         }
       },
       progressive: 1000,
       animation: false
     }]
   }`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org