You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Cenmingyang (via GitHub)" <gi...@apache.org> on 2025/09/24 02:54:27 UTC

[I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   ### Version
   
   6.0.0
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/gicocqqo-the-lessful/pen/OPMVYzw
   
   ### Steps to Reproduce
   
   1-9
   2-9
   的数据都是空,但是在图表上的表现不一样,一个有背景色,一个无背景色
   
   ### 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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   I don't think this is a bug since the [documentation](https://echarts.apache.org/option.html#yAxis.splitArea.areaStyle.color) says:
   
   > [yAxis.splitArea.areaStyle.color](https://echarts.apache.org/option.html#yAxis.splitArea.areaStyle.color)  = ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)']
   >
   > Color of split area. SplitArea color could also be set in color array, which the split lines would take as their colors in turns. Dark and light colors in turns are used by default.


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   yes, explicitly setting `areaStyle.color` fixes it, but OP was relying on the default color setting with `splitArea: {show: true}`.
    [Demo](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbQCMPWACYpAZgC6fUrDwgANhDBYOVEclUALYAHciYDgFcqsAL4lby2ORz4iqFRWp0mLdl15-WCEwfQkpWVhFJ3Q1TW1dfQ8VI1NzKyoY0gB6bPRLaHpgAFtiqmgwMmBYADMIDGCqGsZLdUq4rR09AiD0XMZEgGUKdRokIvVOMVoOVgAjRgAKaQBWAAYeVY2tnjWAOjkASl4Z-aXpNe3Lzev9o9oFexUnuyc8Kg4IKkJYUSDklTQRhlOgABQK9EMsAAwgMBIEUmRKDRYLRDHowMVGCAESkQmFeqQAYjYAA3RjqaxiDYyKRrJSElRaKjFYbkUbuRkpCZTVEWRjQNQDcpgXEk0hzTgCD4AdQgAjAhiIsi5KklHGlHGhwEmHDocw4pmgtFVdi5LxUCiCLyttgA3EA)


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   remove `splitArea` from axes ? 
   📌 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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   Hello, @helgasoft @plainheart,
   
   I've been looking into this issue and found that the default order for splitArea.areaStyle.color in v6 is different from previous versions.
   
   I found that by reverting the default color order in src/coord/axisDefault.ts, the inconsistent behavior is resolved for heatmaps with empty data. This fix works for both the Canvas and SVG renderers.
   
   Here is the code change I tested locally:
   
   Diff
   ```
   /src/coord/axisDefault.ts
   /src/coord/axisDefault.ts
   @@ -121,8 +121,8 @@
      splitArea: {
        show: false,
        areaStyle: {
          color: [
    -       tokens.color.backgroundTransparent,
    -       tokens.color.backgroundTint
    +       tokens.color.backgroundTint,
    +       tokens.color.backgroundTransparent
          ]
        }
      },
   
   ```
   
   This change directly fixes the visual inconsistency:
   
   Before: The color of the top-left block is inconsistent with the rest of its column. <img width="1062" height="571" alt="Image" src="https://github.com/user-attachments/assets/a0648937-0088-407d-a393-a0e8f3cedc6a" />
   
   After: The color is now consistent for both SVG and Canvas renderers. <img width="1275" height="519" alt="Image" src="https://github.com/user-attachments/assets/80b7a581-6cb0-4786-8522-84878cf015c9" />
   
   Let me know if this seems like the right approach. If so, I would be happy to create a pull request to resolve this issue. Thanks!
   


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   It appears to be a bug in `splitArea`. Workaround is to set `areaStyle:{opacity:0.99}` in **xAxis**.splitArea.


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   It can solve the problem, but I’d prefer to add splitArea, and I hope their behavior can be consistent.


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   @helgasoft Thanks for your information. It should be a bug, as I can see the different behavior between SVG renderer and Canvas renderer in your demo.


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


Re: [I] [Bug] 热力图对于空数据的表现不一致 [echarts]

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

   @Cenmingyang 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] The heatmap performs inconsistently with empty data.
   
   **BODY**
   
   ### Version6.0.0### Link to Minimal Reproductionhttps://codepen.io/gicocqqo-the-lessful/pen/OPMVYzw### Steps to Reproduce1-92-9The data is empty, but the performance on the chart is different; one has a background color and one does not.### Current BehaviorThe issue encountered during the development of the heat map.### Expected BehaviorThe performance should be consistent.### 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