You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "zjxpcyc (via GitHub)" <gi...@apache.org> on 2023/09/11 07:23:10 UTC

[GitHub] [echarts] zjxpcyc opened a new issue, #19104: [Bug] SVG 与 Canvas 两种模式下 LinearGradient 表现不一致

zjxpcyc opened a new issue, #19104:
URL: https://github.com/apache/echarts/issues/19104

   ### Version
   
   5.4
   
   ### Link to Minimal Reproduction
   
   https://codesandbox.io/embed/apache-echarts-demo-forked-wxjmyk?fontsize=14&hidenavigation=1&theme=dark
   
   ### Steps to Reproduce
   
   1、新建一个基础 柱图
   2、配置渐变色
   
   ```js
   color: [{
           type: 'linear',
           x: 0,
           y: 0,
           x2: 1,
           y2: 1,
           colorStops: [
             {
               offset: 0, color: 'red' // 0% 处的颜色
             },
             {
               offset: 0.49, color: 'red' // 0% 处的颜色
             },
             {
               offset: 0.5, color: 'blue' // 100% 处的颜色
             },
             {
               offset: 1, color: 'blue' // 100% 处的颜色
             },
           ],
           global: false // 缺省为 false
         }]
   ```
   3、查看默认 canvas 下表现
   4、修改 svg 渲染方式,查看表现
   
   
   ### Current Behavior
   
   两种模式下渲染不一致
   
   ### Expected Behavior
   
   两种模式渲染一致
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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-unsubscribe@echarts.apache.org.apache.org

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


[GitHub] [echarts] zjxpcyc closed issue #19104: [Bug] SVG 与 Canvas 两种模式下 LinearGradient 表现不一致

Posted by "zjxpcyc (via GitHub)" <gi...@apache.org>.
zjxpcyc closed issue #19104: [Bug] SVG 与 Canvas 两种模式下 LinearGradient 表现不一致
URL: https://github.com/apache/echarts/issues/19104


-- 
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-unsubscribe@echarts.apache.org

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


[GitHub] [echarts] echarts-bot[bot] commented on issue #19104: [Bug] SVG 与 Canvas 两种模式下 LinearGradient 表现不一致

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #19104:
URL: https://github.com/apache/echarts/issues/19104#issuecomment-1713313057

   @zjxpcyc It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] LinearGradient behaves inconsistently in SVG and Canvas modes
   
   **BODY**
   
   ### Version
   
   5.4
   
   ### Link to Minimal Reproduction
   
   https://codesandbox.io/embed/apache-echarts-demo-forked-wxjmyk?fontsize=14&hidenavigation=1&theme=dark
   
   ### Steps to Reproduce
   
   1. Create a new basic column chart
   2. Configure gradient color
   
   ```js
   color: [{
           type: 'linear',
           x: 0,
           y: 0,
           x2: 1,
           y2: 1,
           colorStops: [
             {
               offset: 0, color: 'red' // color at 0%
             },
             {
               offset: 0.49, color: 'red' // color at 0%
             },
             {
               offset: 0.5, color: 'blue' // color at 100%
             },
             {
               offset: 1, color: 'blue' // color at 100%
             },
           ],
           global: false // Default is false
         }]
   ```
   3. Check the performance under default canvas
   4. Modify the svg rendering method and check the performance
   
   
   ### Current Behavior
   
   Rendering is inconsistent in the two modes
   
   ### Expected Behavior
   
   Both modes render the same
   
   ### Environment
   
   ```markdown
   - OS:
   -Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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-unsubscribe@echarts.apache.org

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


[GitHub] [echarts] helgasoft commented on issue #19104: [Bug] SVG 与 Canvas 两种模式下 LinearGradient 表现不一致

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19104:
URL: https://github.com/apache/echarts/issues/19104#issuecomment-1715863829

   set **```x2: 0```** instead of ```x2: 1```
   Please close issue if problem solved.


-- 
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-unsubscribe@echarts.apache.org

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