You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/07/10 03:51:23 UTC

[GitHub] [echarts] anymos opened a new issue, #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

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

   ### Version
   
   5.2.2
   
   ### Link to Minimal Reproduction
   
   https://github.com/apache/echarts/issues/10223
   
   ### Steps to Reproduce
   
   Have a look to https://github.com/apache/echarts/issues/10223 each steps are described to reproduce it. Very easy
   
   ### Current Behavior
   
   need to have x of the dataset as an array:
   
   const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));
   
   ### Expected Behavior
   
   To not have to convert to array.
   
   ### Environment
   
   ```markdown
   - OS:macOS Monterey
   - Browser: Chrome 96.0.4664.55
   - Framework:any
   ```
   
   
   ### Any additional comments?
   
   Sorry, for this, but the original issue was closed by the original poster as he found a  workaround (the Array.from conversion), 
   but this is still a bug, this conversion shall not be needed, and in case of HUGE ;-) dataset like millions of timestamp, this is still a problem as it double the RAM needed, without speaking of the optimisation lost by NOT using Float64Array directly.
   
   
   https://github.com/apache/echarts/issues/10223 : this is the original ticket.
   
   Thank you very much in advance for your consideration :)


-- 
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] anymos commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
anymos commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1181312020

   Hi @plainheart , thank you to come back to me that quick, it's really cool.
   
   I agree that the current source code do not handle that case with dataset as a row (regular array with typed arrays)
   Meanwhile the work around that you propose could work for small data set, it get in a way of huge data set in the form of typeArray.
   
   An exemple to illustrate this with a time series from financial, it is  lot easier to manage typeArray extends by concatenating them using binary copy when the dataset are in row with [[time][price][etc ...] than using a one dimension array,. 
   
   With a one time dimension array you can not add a new variable easily as you have to recompute the full one dimension array to add them inside for each of them.
   
   Beside, with one dimension array, you need to keep only one typed array Float64 or int64 , with multiple dimension you can have [float64,int64, etc ...]
   
   Which is more optimal from a RAM perspective.
   
   In my use case there is millions of records and it impact the RAM quite a bit.
   
   In understand that it is maybe not a priority, and I am not too sure of the complexity involved to make this happens.
   
   I let you judge you know a lot better than me the underlying code and dependency.
   
   In the mean time, thank you again for your time to read and review that ticket.
   
   Have a good day moving forward ! 
   
   
   


-- 
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] plainheart commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1368283329

   @anymos Hi Raphael, I'm not sure if the following way can help you but just take it a try.
   
   Please find `isArray` in https://github.com/apache/echarts/blob/master/src/data/Source.ts#L274 in your local dist file and change it to `isArrayLike`. I didn't do more tests for it but at least it works with this [demo code](https://echarts.apache.org/examples/editor.html?c=line-simple&code=MYewdgzgLgBAHjAvDMBTA7jAYgGxAQygDYAWAQQCcL8BPACgG0BGAGhgCY2BmNktgVjZE2AdjYAONgE42TAAwBdAJQBuAFChIsGkhQZseQqUrV6DLsI5yBPGCT4wugu5aljHkmEynL1akAAOUACW4LoA3mow8GRwwRAAXDDhMFA0AahJAOQAbvg4AK6oWWwAJoT4SQgAvixRMDSx8UkpaRnZeYXFMLX15VD4EKhQLfXRECAFFMCZMAxwbDQK9b3jqBTBqInJY6nps1k4wWglu0MbWwAytJNQAEI02RQg6KfR0Tj4AEaoOKPv7wgAAsXkkoBQirtqis1NUVEA).


-- 
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] anymos commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
anymos commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1328279001

   Hi there a little bump on this, any idea if it could be fixed easily ?


-- 
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] plainheart commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1179744927

   Hi, @anymos I'm not sure if this is an unexpected case. According to the [source code](https://github.com/apache/echarts/blob/master/src/data/Source.ts#L256-L294), it doesn't handle the case when the source data is a regular array that contains typed arrays. Perhaps, you can try to use the workaround 2(using a one-dimension typed array) mentioned in #10223.


-- 
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] anymos commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
anymos commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1368179040

   Hi there a little bump on this, any idea if it could be fixed easily ?


-- 
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] anymos commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

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

   It is indeed probably going to work but is there a officially supported version that I could use ?  It would prefer to not modify the lib source code so it s stay compatible


-- 
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] anymos commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
anymos commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1207577139

   Good morning! you are welcome @plainheart ! I did not hear from @100pah or @pissang , but I believe they are probably busy fixing more urgent bug. In the mean time I believe I found another bug related to dataset that might be more blocking, I described it here : https://github.com/apache/echarts/issues/17479
   
   Have a good day moving forward !


-- 
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] plainheart commented on issue #17342: [Bug] Float64Array can not be used in a dataset unless the X is converted to an array: const x = Array.from(new Float64Array([1,2,3,4,5,6,7,8,9,10]));

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #17342:
URL: https://github.com/apache/echarts/issues/17342#issuecomment-1181409260

   @anymos Thanks for your detailed information! Perhaps, @100pah and @pissang, the author of the dataset component, can provide you with further help.


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