Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radar with Log Axis throws error #11298

Closed
zifix opened this issue Sep 22, 2019 · 6 comments · Fixed by #11324
Closed

Radar with Log Axis throws error #11298

zifix opened this issue Sep 22, 2019 · 6 comments · Fixed by #11324
Labels
en This issue is in English new-feature

Comments

@zifix
Copy link
Contributor

zifix commented Sep 22, 2019

Version

4.3.0

Steps to reproduce

  1. Set up a radar chart
  2. Add to options:
    radiusAxis: {
       type: 'log'
     }
    

What is expected?

The same chart to render with log10-axis

What is actually happening?

Got an exception:

ERROR TypeError: "radiusAxis is null"
    render RadiusAxisView.js:61
    renderComponents echarts.js:1369
    each util.js:298
    renderComponents echarts.js:1367
    render echarts.js:1353
    update echarts.js:805
    setOption echarts.js:398
@echarts-bot
Copy link

echarts-bot bot commented Sep 22, 2019

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 and chart option 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 .

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Sep 22, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Sep 24, 2019

radiusAxis is for bar/line charts in polar system, which is not for radar charts. We do not support log axis for radar axis (actually, there is no such thing as radar axis).

If you do need such a feature, I can set this issue to be a feature request. You are encouraged to making a pull request for this feature, and we can give you some advice on how to implement if you are interested in it.

@Ovilia Ovilia added not-a-bug waiting-for: author and removed bug pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Sep 24, 2019
@zifix
Copy link
Contributor Author

zifix commented Sep 24, 2019

Hi @Ovilia,
thanks for the clarification. I think the feature can be useful and I'm proficient in javascript, a total noob at charts though as you can see in my mix-up of the terminology 👅
If you think that's good enough to handle the complexity of this feature, then I'm willing to give it shot.
BR
Zifix

@Ovilia
Copy link
Contributor

Ovilia commented Sep 25, 2019

@zifix Great!
@100pah Please give some advice on how to make this possible.

@pissang
Copy link
Contributor

pissang commented Sep 25, 2019

Hi @zifix, really appreciate your passion!

In ECharts, axis type like 'log' is abstracted as Scale. There are different kinds of scales:

  • Ordinal
  • Interval
  • Log
  • Time

Ordinal scale and interval scale are the most commonly used. Ordinal is for category data, while the interval is for the number like data.

We fixed the scale to be interval in the radar chart. https://github.com/apache/incubator-echarts/blob/master/src/coord/radar/Radar.js#L43 But as you mentioned. It's better to support log scale.

About how to create the scale from the given option. https://github.com/apache/incubator-echarts/blob/master/src/coord/axisHelper.js#L248 may be an example you can reference.

Please let us know if you have any more questions. Looking forward to your fix:)

@zifix
Copy link
Contributor Author

zifix commented Sep 25, 2019

@pissang Not sure if it was as easy as I think it was, but you are surely going to tell me :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en This issue is in English new-feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants