You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "luisaW-stack (via GitHub)" <gi...@apache.org> on 2023/02/08 13:15:47 UTC

[GitHub] [echarts] luisaW-stack opened a new issue, #18252: [Feature] Option to disable the granularity in the time axis

luisaW-stack opened a new issue, #18252:
URL: https://github.com/apache/echarts/issues/18252

   ### What problem does this feature solve?
   
   Is there a way to disable the different time granularity in the time axis? E.g. when displaying the dates, the month should not be displayed when there is a switch to a new month.
   
   ### What does the proposed API look like?
   
   https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter
   https://apache.github.io/echarts-handbook/en/basics/release-note/v5-feature/ (see section Time Axis, in the second graph the month should not be displayed)
   


-- 
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] bgmeinder commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   Yeah, this functionality broke interval and minInterval.  Maybe minInterval was always weird where it seems like there is some internal calculation to determine how many ticks to show, and you have to have a high enough minInterval to push it to the next threshold. 
   
   There is all kinds of weirdness and inconsistency going on.  You set a min: 6/14, max: 9/18 and you get 7 day intervals, with issues each month because the intervals hit the 29th and 1st.  You change min to 6/13, and suddenly it's bi-monthly, but 1st & 17th.  I mean, I can live with that, because it's not noticeably differently sized intervals, but huh?  13 days, 16 days, 14 days, 16 days?  Maybe there is a timezone issue, but wouldn't you expect 1/15 each month? Or some moment month/2 days or something?
   
   
   
   
   
   


-- 
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] helgasoft commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   Yes, you can disable it with [String Templates](https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter:~:text=Using%20string%20templates).
   [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAmBDMWDOApmAFywDaSsa6sewArgE4DGBpZ1N5sARAEwAGAIwAOALQDxQgKwAVIQOICALEqEA6AMyaAnAC0eAGlhCAuoc40yvQaIlSAbPMVDVQzep2uDxvucvo1vzC4gI6EkLOxK7RHl7KPrAC_lyBNiES4TJRyooCHq4A7ImaKalBtqFZIvJCxNIuylqa0ol-lqbUAL5lAB4Agr0QeKSoXGAAniBssADkkAC2BLPGllhDeAAyWABGBAA2owGwAGbAjAs4YASMR6k0APQP6AswYAAWpLNIALJ_XStYE9YAApLDQYwAMQIO2M6nhxxeb0-cyQGABFnu6GwEy-aIBxy6liJ6C6mNgE0Gw1GsEm0y-ADcsPt6MtYGTqIRGBACCNuJQ6TNZvsINA2V1YJ0ugBuIA)
   ![image](https://user-images.githubusercontent.com/13038071/217616411-bb546a1e-e857-41e8-a1d6-b5fba3d80556.png)
   


-- 
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] luisaW-stack commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   Thanks for the response. I would like to avoid using the String Template and instead let ECharts calculate the format of the time axis, while only showing one type of granularity. Is this possible?


-- 
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] helgasoft commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   @bgmeinder - good explanation, now I understand the problem.
   Cannot offer a fix, but kind of a makeup relief. Playing with [maxInterval](https://echarts.apache.org/en/option.html#xAxis.maxInterval) and _formatter_ will produce decent results.
   [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAmBDMWDOApmAFywDaSsa6sewArgE4DGBpZ1N5sARAEwAGPgGYAtAICMoiQFYAKhIHEBAFmUSAdMOEBOAFo8ANLAkBdQ5xplegkeL7SAbAqUS1E4Rp1uDxvuct0a34hMQEwiRdiN2jPbxVfWAEAriCbUPExWSiVJXCNNwB2ROEU1ODbMJVpAA4FCWIZVxUtYRlE_0tTagBfMoAPAEF-iDxSVC4wAE8QNlgAckgAWwJ5iy4lrH6ASWgwAkYANywAG1IACmFHAQFYACpYPhV7kxuBAEp7lWMAeh-EWDPbBTPCWP54EAnCBgABy9CWACMDqQPOsaFtRgAZLBIs7IQKwABmwEYmzA-0Y4wJ6CWMDAAAtSPMkBgegAdaBIACyPJ6ayoqRowKZLL5v3-zKmUqmPR-3K5spZrPmBJ6ljV6B6aKmw1G41g01mTOOJ3oq1gWuohEYEAIY24lENc3mUOg5p6sG6PQA3EA)
   ![image](https://user-images.githubusercontent.com/13038071/225460656-1c719d8f-14c7-4678-987f-25d0420b8f43.png)
   


-- 
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] bgmeinder commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   @helgasoft  Version 4 had the behavior.  Version 5 added new intervals for Year/Month.
   
   Look at my demo above.  The X axis looks terrible.  Look at your demo.  It's 4 day intervals, then suddenly the 1st is there after 2 days.    Update your demo to be a 3 month span, and yyyy/MM/dd format and you suddenly see why it's a problem.   splitNumber doesn't fix that.  "Note that this number serves only as a recommendation, and the true segments may be adjusted based on readability."  MinInterval seems like it might help, but it's unclear what that number should be.  Milliseconds?  Even so, adding that didn't change my demo.
   
   Think about a use case of previous 90 days.  You don't care if it's the first of the of month or the year.  The goal of the feature request is to not add arbitrary ticks, or make them something like a minorTick that can be hidden.  That if I have a previous 60 days timespan, and echarts determines that interval to be 7 days, it's always 7 days.  Not, 7 days, 1st of the month, 7 days from that.  


-- 
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] luisa-c-wolf commented on issue #18252: [Feature] Option to disable the granularity in the time axis

Posted by "luisa-c-wolf (via GitHub)" <gi...@apache.org>.
luisa-c-wolf commented on issue #18252:
URL: https://github.com/apache/echarts/issues/18252#issuecomment-1429304457

   My problem comes from the newly added feature from the release v5, where ECharts added the feature of showing different time granularities. I would like to not use this and instead show only one granularity (without using a string template, I pass time data into a Chart and let the format of the time axis be handled by ECharts based on my input data). This was possible before the release, so I am wondering if there is a way to disable this new feature.


-- 
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] helgasoft commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   _minInterval_ works, but in a weird way. The auto-generated interval in your example is 7 days, _minInterval_ has to be more than **twice** that to take effect. For instance ```minInterval: (3600 * 24 * 1000) *17``` will make labels sparse.


-- 
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] helgasoft commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   why not, AI is coming...
   
   
   On Sat, Feb 11, 2023, 08:56 LuisaW ***@***.***> wrote:
   
   > Thanks for the response. I would like to avoid using the String Template
   > and instead let ECharts calculate the format of the time axis, while only
   > showing one type of granularity. Is this possible?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/echarts/issues/18252#issuecomment-1426823758>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ADDPD56UPQKGFW4O2VIKBQLWW7AD7ANCNFSM6AAAAAAUVH4EVI>
   > .
   > You are receiving this because you commented.Message ID:
   > ***@***.***>
   >
   


-- 
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] bgmeinder commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   Thanks, but that doesn't help me.  My demo is essentially our use case.  Labels are too wide so they overlap.  Hide overlap or a formatter can solve that, but I can't hide the extra ticks.  
   
   If minInterval worked like minInterval does, that would be a solution, but it doesn't.  I don't know if that is a bug, or it works differently.  


-- 
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] bgmeinder commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   Second this item.  String templates doesn't work.  Yes, you can hack it, but we should be able to have a consistent interval rather than having arbitrary Ticks added
   
   [Demo](https://codepen.io/bgmeinder/pen/OJoZEJy)


-- 
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] helgasoft commented on issue #18252: [Feature] Option to disable the granularity in the time axis

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

   @luisa-c-wolf, when you say "was possible before the release", which previous release worked for you?  I checked the older available v.5.0.0 and it was still showing days and months mixed. So it seems the current behavior was established long ago.
   
   @bgmeinder, "consistent interval" can be set with [xAxis.splitNumber](https://echarts.apache.org/en/option.html#xAxis.splitNumber)
   
   It is still unclear to me what is the goal of this feature request. Maybe it would be better to describe **what you want to see** - providing an image is best.
   <details><summary>disclaimer</summary>
   opinions expressed in this post are strictly personal, as ECharts user, not a developer
   </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