sxc731 commented on issue #18675:
URL: https://github.com/apache/echarts/issues/18675#issuecomment-2724247122

   A suggestion: perhaps the title of the bug is a bit misleading.  Candlestick 
charts *do* support `xAxis.type='time'`; however, the way I understand OP's 
issue is that rendering could be improved when the data has time gaps.
   
   That said I landed here because I couldn't modify the basic official 
examples to work *at all* with `xAxis.type='time'` ([this is what you 
get](https://echarts.apache.org/examples/en/editor.html?c=candlestick-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurACYCGYFRA2gOQBMADAIwDsAtK854wCz0ANLCZsuPPgFZholh269GANlliFkxu3oBdISXRgAniACmRepAC2p-iQC--9EZz4iSRyTymAThFOEsLQGxKSkxmYWAMYU0GQANgGQUQDWwiHolNR0GaS0LCIAzPwiPEUAHHq56LT8zEVSRfWwUsxVYWG0hawVRYUi_PztHTWF5aWNLQOMOrmzYfYks_YA3EA)),
 leading me to believe that, as implied by the report's current headline, this 
isn't supported for candlesticks charts.
   
   This isn't an issue with the example's data being in ISO 8601 format; 
according to [the 
docs](https://echarts.apache.org/en/option.html#series-line.data) these are 
supported and in any case, modifying the example [to use 
epoch-time](https://echarts.apache.org/examples/en/editor.html?c=candlestick-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurACYCGYFRA2gIwCsADABwDsAnAGzN_8AaWEzatWAJgAs_PkJGseYmczktOzRo3HKAugJLowATxABTIgHJIAW1MWSAX33ojOfESROSeUwCcIpoSwtAbEpKTGZpYAxhTQZAA2gZDRANYWzuHkVDTBoeG02kIAzJJyKrDFrHr5pLTSJYwlFSw1WXXF9CWsJcVCkpJt7cFVqkJNsJLiOrUz4Q4kMw4A3EA)
 doesn't fix it.  I also attempted to use `formatter` strings and functions to 
no avail.
   
   The above examples (@helgasoft - thanks!) helped me figure out that if you 
provide the timestamp consolidated as the first component of each candlestick 
data point, as in this [adjusted 
example](https://echarts.apache.org/examples/en/editor.html?c=candlestick-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5JALZW0kC-ANCeTvkUhyTxUAThCqFYAbRLpUpUhWp0AxgENoAEwA24yMoDWtTvPQbVYVUWknSk2gCYADAEYA7AFpnj9_YAsR2Cd2WABmX2CvYJCADgBdYxspBxcPLx8AVgDfRyj0qJzYdMd4mRM7JzdPb3sANgCQ5yjoqJDg318SxKSK1OrXeubYZzzCtvtY0vQJ-VYSCdYAbiA),
 rather than separately within `xAxis` (as in all the official examples, as far 
as I can tell), a time - rather than 'category' - xAxis does at least restore 
the basic example... and works well enough for my purposes.
   
   Not sure if what's described above is expected behaviour (admittedly I'm new 
at ECharts but a good few hours perusing the documentation didn't help me) or 
if this needs a separate bug report?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to