Justin-ZS commented on issue #20608:
URL: https://github.com/apache/echarts/issues/20608#issuecomment-3173221593

   > how does splitNumber should use the gradient? something like this?
   > 
   > splitNumber: 4, dimension: 0, min: 0, max: 4, inRange: {color: [['red', 
'blue'], 'blue', 'green', ['green', 'yellow']]
   > 
   > should look like this?
   > 
   > <img alt="Image" width="860" height="540" 
src="https://private-user-images.githubusercontent.com/140714367/475721706-f9e1e8b6-525b-468e-a44e-594bc5b25da6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTQ4ODUxNjQsIm5iZiI6MTc1NDg4NDg2NCwicGF0aCI6Ii8xNDA3MTQzNjcvNDc1NzIxNzA2LWY5ZTFlOGI2LTUyNWItNDY4ZS1hNDRlLTU5NGJjNWIyNWRhNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxMVQwNDAxMDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMDYxMDA4MjJkYTZjOWIwZmQyY2UyYmExNmUyZGUyZmJjNjRmNWJlYjNiZjE2YmVmZWUyODJlYzg0OWQzNTBmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jhqN8oi7WaVvvwqH6iWmEQa2xF8XVZTFiurPbxYFJUY";>
   
   My usage is set gradient color for `bar`.
   ```
   {
       "splitNumber": 3,
       "min": 147518,
       "max": 2948082,
       "inRange": {
           "color": [
               {
                   "colorStops": [
                       {
                           "offset": 0,
                           "color": "rgba(161, 188, 231, 0.3)"
                       },
                       {
                           "offset": 1,
                           "color": "rgba(161, 188, 231, 1)"
                       }
                   ],
                   "x": 0,
                   "y": 0,
                   "x2": 1,
                   "y2": 0,
                   "type": "linear",
                   "global": false
               },
               {
                   "colorStops": [
                       {
                           "offset": 0,
                           "color": "rgba(102, 146, 215, 0.3)"
                       },
                       {
                           "offset": 1,
                           "color": "rgba(102, 146, 215, 1)"
                       }
                   ],
                   "x": 0,
                   "y": 0,
                   "x2": 1,
                   "y2": 0,
                   "type": "linear",
                   "global": false
               },
               {
                   "colorStops": [
                       {
                           "offset": 0,
                           "color": "rgba(67, 121, 206, 0.3)"
                       },
                       {
                           "offset": 1,
                           "color": "rgba(67, 121, 206, 1)"
                       }
                   ],
                   "x": 0,
                   "y": 0,
                   "x2": 1,
                   "y2": 0,
                   "type": "linear",
                   "global": false
               }
           ]
       }
   
   }
   ```
   Since `splitNumber` is equal to the number of colors, the actual color 
should be exactly one of the gradient colors.


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org

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


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

Reply via email to