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

[I] [Bug] `null` values in line chart with visual map behaves randomly [echarts]

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

   ### Version
   
   5.6.0
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/cracksalad/pen/Pwwpzeq
   
   ### Steps to Reproduce
   
   1. Setup a line chart with visual map 
   2. Add some `null` values in the dimension the visual map operates on.
   
   ### Current Behavior
   
   The result is somewhat random: In the example I linked via CodePen there are two datasets. The first works totally fine and marks some data points with red triangles while the other dataset is not marked at all, although it has data points to be marked as well (see dimension 2). While searching for the cause of this behavior I had examples having multiple datasets, none of them working as well as examples having multiple datasets and all of them worked fine. The one constant observation is, that it affects a whole dataset or not. There is no "some data points in a dataset are affected, others are not".
   As soon as one replaces the `null` values in dimension 2 with say empty strings, everything works fine.
   
   ### Expected Behavior
   
   Both datasets in the CodePen example should have data points marked with red triangles.
   
   ### Environment
   
   ```markdown
   - OS: Ubuntu 24.04 x64, Windows 10 x64
   - Browser: Firefox 137, Chromium 135
   - Framework: none, ngx-echarts (Angular)
   ```
   
   ### Any additional comments?
   
   After many hours of trial and error I found this note about "empty value" [here in the docs](https://echarts.apache.org/en/option.html#series-line.data) which pointed me in the right direction. Although I am not even using `series.data`. 
   So I think this behavior should be documented more clearly if expected or fixed if unexpected of course.


-- 
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] `null` values in line chart with visual map behaves randomly [echarts]

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

   Your _visualMap_ has ```categories: ['malfunction', 'drift']```. All values equal to one of these two categories are treated as _inRange_, everything else (like _null_) is _outOfRange_.  So seeing _null_ as circle is expected behavior. If you add a **data pre-processing** step to replace all nulls with 'malfunction', then the chart will display as you expect.
   
   However there is another **bug** that I think has not been reported so far. The second (green) line data starts with multiple _null_ values and shows the entire line as "empty" even though there are 'draft' values. The workaround is to replace the first record _null_ value with an empty string - [Demo](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWszGAG0iAXMmuhgE4QDmFApqYQOQCGAHhAM70A0x6wpAJrQYA3RtgCu1ACLU2AY3rEAvt3RtaEWYQDaPIiRLRGAW2oMQACQC0AdVphYAOQhhysAIwA6d1z3owAJ4gZrD02BDQ1L4G6PyMYIzqYACS0ILMhAAMeip6qDGwRqbm1nakDs6uELAATN7RMYHBDOGRDQZxCUmp6YTuOcQAuqqwwuziYgCyjAT6JE0h9CCactQA7uxRI2oAFsBrhABmYurbsHLx1BR8mmw69MZih-LQcpAwXKH85Idg9MN6dTkWQ9agZWDaTKcdwAjoQUzQNhQaCEGpnCIAJUY0BohHyMTYAWMACMcAwqtiKNgtn5YISSTgAMoQABeIQAnGd0HIcHwGABiABigoALJkAMzsxQGXIGYDiMAAeUOWJxIXxBnppOwDGoxnAAQAwhBSHJqdKSEplCNqTQ0njAXsDmRJNbiJ1EtQwDo8rSIPwGDUAOwi9okfjw6iI5F3CH0SCmNgJfWfB7URLiUh6qN_TihWikPj_Ll0-WmkK6ArobT0GqZGoiqzuTJWGoAVgAKplMvhu73MgBqev9z5Bzxo0KPbDPV7vaDF2
 nV2v1xvN1sANi7Pb73aHNRHebHNXcefo3wgvwXVbjdYbTZbwa3_f7e4PsCPJ6-Pz-sKrNdvq4PgAHE-O6Dpk7hvh-p7npev4FP-K73q27Kgdu4GQd2o7jp-DxPC8bzIlef7Lnea7iu4aEvhBUHjiKMHfsRCGkau7hWBBVG7jRWGHuODEXj-JZLgBTZsfWnEYbRx78XBQk3kh7hieKElDphmTYdJX4CUxMSIWRYkiip3HqbxNTijJgmLvJ-nsZ2YHUWpGlthZOkGHprHsZu9lcY5pnmZO-GzkRgy0iFMpnBqJD-oGQE1GGsSRtGMCxjWCayMmICpqYGZZgiub5qQhakK5paZqsPrXgA9JVhRgg4rTUIU4jYNgsBZiA2CMKs_CwBsYA7KEnxJLAxJdQA1hgwBNS1k10tQjX9Y1xLiBQVnuch7ZGfuPHvuOzmDfBuksRtXnodR20mbtNQTtAzXYIdbnHWuj7eeBF0aeuea3S1D0kOtz0ga9qm0f5333XJ_0PqhQPGRpnLTeDa1PS2FFGb5V1AS5v3CQpYmUTD6NjhRWMQ09Yk1GjIP-WejHY9ZHkSpTO1E_RWmyUjImKexhkEyD-009pdP_WJdlnT5IOfWzlnXsLnlM5dROYwjYUxCr6BWugv4BAAgqwsaRQsIhiJIYbGBEDAepMEQWrKsDMLr7AOgYhuhGlNsoEoADcQA)
   
   ![Image](https://github.com/user-attachments/assets/5100ec6a-6dc2-4f22-a5c2-eb5fd047ef21)


-- 
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] `null` values in line chart with visual map behaves randomly [echarts]

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

   > However there is another bug that I think has not been reported so far. The second (green) line data starts with multiple null values and shows the entire line as "empty" even though there are 'draft' values. 
   
   That is exactly what I was talking about: One dataset working as expected (blue) and one that does not (green). 
   
   > One workaround is to replace the first record null value with an empty string
   
   Can confirm, that this works. To elaborate further, one of the first 5 values in the dataset must not be `null` in order for this to work as expected. That is probably why it seemed random to me.


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