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 2020/11/19 02:30:34 UTC

[GitHub] [incubator-echarts] JesseEisen opened a new issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

JesseEisen opened a new issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644


   ### Version
   4.9.0
   
   ### Steps to reproduce
   在 X 轴(value 类型)上数据差异很大的时候,比如 10E-8  和 1 之间。 设置 min,max 为  0 和 1, 此时刻度显示 [0,0.2,0.4,0.6,0.8,1] 。
   这就导致极小数据会显示成一条树直的线。
   
   ### What is expected?
   期望可以把很小坐标的点按比例画出来
   
   ### What is actually happening?
   实际是极小值的点堆叠在一起,呈现一条树直的线
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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

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] [incubator-echarts] JesseEisen edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-730092323


   https://codepen.io/Jesschanlk/pen/wvWbBZM


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

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] [incubator-echarts] JesseEisen commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-735230615


   > 看了下你的 dataset,现在的 x 轴等于是类目型的,得先转成数字的。
   
   这个没有太理解。 我在 series 中定义了 encode: {x: 1, y: 2}  然后将 x 轴指定成 value 类型。 这种方式实际上定义的 x 轴还是一个类目型的吗? 
   
   > 得先转成数字的
   
   这个是说要设置 dimensions 吗。还是其他的操作啊
   
   ---
   
   我现在尝试将 x 轴的 type 改成 log。 绘制出来的结果  x 轴的刻度是从 (1,10)  。 我将部分数据贴到你提供的 example 中,可以达到期望的效果。两边的不同的地方是:
   
   - example 中 series 使用的 data 数组,我用的是 dataset 映射
   
   剩下的是我的 series 中定义了如下的内容:
   
   ```json
   {
       datasetIndex: 0,
       encode: {x: 1, y: 2},
       lineStyle: {width: 2.5},
      name: "xxxx",
      showSymbol: false,
      smooth: false,
     symbolSize: 2,
     type: "line"
   }
   ```
   
   


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

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] [incubator-echarts] echarts-bot[bot] commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-730085496


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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

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] [incubator-echarts] Ovilia commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-736174629


   >  我在 series 中定义了 encode: {x: 1, y: 2} 然后将 x 轴指定成 value 类型。 这种方式实际上定义的 x 轴还是一个类目型的吗?
   对。
   如果是 value 类型,应该都不需要 dataset 或者 data 了,最多指定一下最大最小值就行,类似 https://echarts.apache.org/examples/zh/editor.html?c=scatter-simple


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

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] [incubator-echarts] Ovilia edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-736174629


   >  我在 series 中定义了 encode: {x: 1, y: 2} 然后将 x 轴指定成 value 类型。 这种方式实际上定义的 x 轴还是一个类目型的吗?
   
   对。
   如果是 value 类型,应该都不需要 dataset 或者 data 了,最多指定一下最大最小值就行,类似 https://echarts.apache.org/examples/zh/editor.html?c=scatter-simple


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

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] [incubator-echarts] JesseEisen commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-730092323


   https://codepen.io/Ovilia/pen/dyYWXWM


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

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] [incubator-echarts] Ovilia commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-733424865


   不知道你说的没有效果是什么意思,是有 bug 还是仍然显示不好。https://echarts.apache.org/examples/zh/editor.html?c=line-log 这是一个 y 轴 log 的例子,你可以改成 x y 都是 log 轴的。


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

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] [incubator-echarts] JesseEisen edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-735230615


   > 看了下你的 dataset,现在的 x 轴等于是类目型的,得先转成数字的。
   
   这个没有太理解。 我在 series 中定义了 encode: {x: 1, y: 2}  然后将 x 轴指定成 value 类型。 这种方式实际上定义的 x 轴还是一个类目型的吗? 
   
   > 得先转成数字的
   
   这个是说要设置 dimensions 吗, 还是其他的操作啊
   
   ---
   
   我现在尝试将 x 轴的 type 改成 log。 绘制出来的结果  x 轴的刻度是从 (1,10)  。 我将部分数据贴到你提供的 example 中,可以达到期望的效果。两边的不同的地方是:
   
   - example 中 series 使用的 data 数组,我用的是 dataset 映射
   
   剩下的是我的 series 中定义了如下的内容:
   
   ```js
   {
       datasetIndex: 0,
       encode: {x: 1, y: 2},
       lineStyle: {width: 2.5},
       name: "xxxx",
       showSymbol: false,
       smooth: false,
       symbolSize: 2,
       type: "line"
   }
   ```
   
   


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

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] [incubator-echarts] echarts-bot[bot] commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-730086257


   @JesseEisen Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://www.makeapie.com/editor.html.


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

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] [incubator-echarts] JesseEisen commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-732906563


   尝试过把 x 轴设置成 log 轴的方式,但是没有效果。 


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

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] [incubator-echarts] JesseEisen commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-732686146


   期望的效果:
   能够将 `10E-8 ~ 10E-2` 这些**横坐标**值比较小的点能够显示出来。也就是**横坐标**的刻度可以设置成 `[0, 10E-8, 10E-6, 10E-4, 10E-2, 1]` 这样。 这样图看起来是一个折线形式而不是点都贴在横坐标 0 附近。


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

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] [incubator-echarts] JesseEisen edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-735230615


   > 看了下你的 dataset,现在的 x 轴等于是类目型的,得先转成数字的。
   
   这个没有太理解。 我在 series 中定义了 encode: {x: 1, y: 2}  然后将 x 轴指定成 value 类型。 这种方式实际上定义的 x 轴还是一个类目型的吗? 
   
   > 得先转成数字的
   
   这个是说要设置 dimensions 吗。还是其他的操作啊
   
   ---
   
   我现在尝试将 x 轴的 type 改成 log。 绘制出来的结果  x 轴的刻度是从 (1,10)  。 我将部分数据贴到你提供的 example 中,可以达到期望的效果。两边的不同的地方是:
   
   - example 中 series 使用的 data 数组,我用的是 dataset 映射
   
   剩下的是我的 series 中定义了如下的内容:
   
   ```js
   {
       datasetIndex: 0,
       encode: {x: 1, y: 2},
       lineStyle: {width: 2.5},
      name: "xxxx",
      showSymbol: false,
      smooth: false,
     symbolSize: 2,
     type: "line"
   }
   ```
   
   


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

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] [incubator-echarts] Ovilia commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-733425033


   如果还有问题的话,建议把现在的效果做一个在线的例子,供我们进一步讨论。


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

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] [incubator-echarts] Ovilia removed a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia removed a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-733425033


   如果还有问题的话,建议把现在的效果做一个在线的例子,供我们进一步讨论。


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

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] [incubator-echarts] Ovilia commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-732717226


   那不就是 log 轴吗?


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

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] [incubator-echarts] Ovilia commented on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-732645422


   期望的效果是怎么样的?


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

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] [incubator-echarts] Ovilia edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
Ovilia edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-733424865


   不知道你说的没有效果是什么意思,是有 bug 还是仍然显示不好。https://echarts.apache.org/examples/zh/editor.html?c=line-log 这是一个 y 轴 log 的例子,你可以改成 x y 都是 log 轴的。
   看了下你的 dataset,现在的 x 轴等于是类目型的,得先转成数字的。


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

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] [incubator-echarts] JesseEisen edited a comment on issue #13644: X 轴 value 类型,如何自定义设置非均匀刻度值(科学计数法),希望图表能够按照这个刻度去绘制。

Posted by GitBox <gi...@apache.org>.
JesseEisen edited a comment on issue #13644:
URL: https://github.com/apache/incubator-echarts/issues/13644#issuecomment-730092323


   https://codepen.io/Jesschanlk/pen/wvWbBZM
   
   数据集里面前半段的数据基本落在 10E-9 ~ 10E-5 之间,加上 dataZoom 控件,看控件最小的刻度只能到 10E-6左右。
   
   也尝试过将 X 轴改成 log 形式,也没办法实现期望的效果。


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

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