You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "ash-hannigan (via GitHub)" <gi...@apache.org> on 2025/02/25 03:19:05 UTC

[I] [Bug] Empty Dataset as target for transform results in Illegal condition error. [echarts]

ash-hannigan opened a new issue, #20788:
URL: https://github.com/apache/echarts/issues/20788

   ### Version
   
   5.6.0
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0kC-ANCeTvkaqWUo1YtAG4BDADYBXZm07o8VAE4QqhWAG0S6fgNgATcWHFKwASQN08wacoDGVALQAzCJLAraC_RWp1JCGhmHwEqaHtgA2EkTDoJGRDYcjojT0ZmWFYdLJIAXR800yowIm0BPQEbO0cygpz0CCsRaoc5AQ4cytIm61s213dPZW8G2BdlYAYAEWNii2baVsdR_TJlcWg8F2BlBj4x9D9hWjcPL1D9SOg3AHMDtYEDCCYtqGg6aHEmVcf0WngtHiUlkAEYWH9smsoaQYXkUKwANxAA
   
   ### Steps to Reproduce
   
   Create an echart option with a source dataset that has an empty array as the source.
   This is a common scenario for when data is loading from a remote API.
   Create a transform dataset that references this empty dataset.
   Create a simple series that references the result of this transformed dataset.
   
   [example: empty dataset source](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0kC-ANCeTvkaqWUo1YtAG4BDADYBXZm07o8VAE4QqhWAG0S6fgNgATcWHFKwASQN08wacoDGVALQAzCJLAraC_RWp1JCGhmHwEqaHtgA2EkTDoJGRDYcjojT0ZmWFYdLJIAXR800yowIm0BPQEbO0cygpz0CCsRaoc5AQ4cytIm61s213dPZW8G2BdlYAYAEWNii2baVsdR_TJlcWg8F2BlBj4x9D9hWjcPL1D9SOg3AHMDtYEDCCYtqGg6aHEmVcf0WngtHiUlkAEYWH9smsoaQYXkUKwANxAA)
   [example: valid dataset source](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0kC-ANCeTvkaqWUo1YtAG4BDADYBXZm07o8VAE4QqhWAG0S6fgNgATcWHFKwASQN08wacoDGVALQAzCJLAraC_RWp1JCGhmHwEqaHtgA2EkTDojT0YQ2HI6CRlmWFYdLJIAXR8E0yowIm0BPQEbO0cypHTZIgBGACYAOib2Q2MSiCZmgHYAFgAGIYBWFoBOIYAOLuhxfpEGqibaDnqpRthWtoBmLoTe5abhsfGmmfnYReWxbbWNgpz0CCsRaoc5AQ4cytI72stm-rncnmU3lesBcymADAAIsZihYPrQvo4ofoyMpxNA8C5gMoGHxoeg_MJaG4PF5QvpItA3ABzUnYgQGPrhPBQaB0O4hMmkWjwWhpR7rQXZbFS0gyvIoVgAbiAA)
   
   ### Current Behavior
   
   echarts throws an error with:
   `Can not find dimension info via: sensor. Existing dimensions: [] . Illegal condition {"dimension":"name","=":"value1"}.`
   
   This occurs even with showLoading();
   
   ### Expected Behavior
   
   echarts returns an empty dataset source.
   The filter should fail and return an empty dataset.
   
   ### Environment
   
   ```markdown
   - OS: Windows 11
   - Browser: Edge / Chrome / Firefox
   - Framework: React 19
   ```
   
   ### 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] Empty Dataset as target for transform results in Illegal condition error. [echarts]

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

   @helgasoft, this works thank you.
   Something to note the dimension array only needs to be the minimal required, which is handy!
   
   For example, if the dataset looks like:
   `[{"name": "cheesecake", "datetime": 1740525269, "value":2, "created": 1740525269, "modified": null, "comment": "", "source": 321545}, ...]`
   
   and only certain properties are required, using a subset in dimensions still works:
   `"dimensions": ["value", "datetime", "name"]`


-- 
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] Empty Dataset as target for transform results in Illegal condition error. [echarts]

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

   add ```dimensions: ['value','datetime','name'],``` in first dataset
    📌 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] Empty Dataset as target for transform results in Illegal condition error. [echarts]

Posted by "ash-hannigan (via GitHub)" <gi...@apache.org>.
ash-hannigan closed issue #20788: [Bug] Empty Dataset as target for transform results in Illegal condition error.
URL: https://github.com/apache/echarts/issues/20788


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