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 2021/10/25 21:35:51 UTC

[GitHub] [echarts] isaaclyman opened a new issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

isaaclyman opened a new issue #15941:
URL: https://github.com/apache/echarts/issues/15941


   ### Version
   5.2.1
   
   ### Steps to reproduce
   1. Build a chart referring to the `AxisBaseOption.data` field, e.g. in `EChartsOption.xAxis`
   2. Upgrade from echarts 5.2.0 to 5.2.1
   3. TypeScript compiler fails because the `data` field does not exist
   
   ### What is expected?
   A breaking change should not exist in a patch version upgrade.
   
   ### What is actually happening?
   Code breaks when patch version is upgraded.
   
   ---
   See the data field here in 5.2.0: https://github.com/apache/echarts/blob/41b7769648333d0a1da1101ebebfc9174d618863/src/coord/axisCommonTypes.ts#L100
   
   In 5.2.1 it's been moved to a different type: https://github.com/apache/echarts/blob/1c70026ec4d0bc18ac91163da7d11ed59c401ed4/src/coord/axisCommonTypes.ts#L120
   
   <!-- 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.

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] pissang edited a comment on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15941:
URL: https://github.com/apache/echarts/issues/15941#issuecomment-951497143


   @isaaclyman It's because the type of axis option is refined in 5.2.1. `data` property only available on the `type: 'category'` axis.


-- 
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] pissang edited a comment on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15941:
URL: https://github.com/apache/echarts/issues/15941#issuecomment-951497143


   @isaaclyman It's because the type of axis option is more refined in 5.2.1. `data` property only available on the `type: 'category'` axis.


-- 
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] pissang commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   @isaaclyman It's because the axis type is more refined in 5.2.1. `data` property only available on the `type: 'category'` axis.


-- 
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] lauritziu commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   Another breaking change is the type for attribute "axisLabel". It is now AxisLabelBaseOption and not AxisLabelOption.
   AxisLabelBaseOption has no attribute "formatter". 
   
   So, it is not possible to define a formatter for an axis anymore. 


-- 
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] echarts-bot[bot] commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   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 it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   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 to 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.

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] pissang edited a comment on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15941:
URL: https://github.com/apache/echarts/issues/15941#issuecomment-951497143


   @isaaclyman It's because the type of axis option is refined in 5.2.1. `data` property only available on the `type: 'category'` axis now. Which matches the actual behavior.
   
   But you are right, we should be more careful about bringing this kind of breaking change in a patch version. 


-- 
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] boombang commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   @pissang how can I infer `CategoryAxisBaseOption` type? `type` property doesn't 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


[GitHub] [echarts] lauritziu commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   Maybe my comment was not very clear. What I mean is the following:
   
   In Charts 5.2.0 we have the AxisBaseOption defined as follows (excerpt):
   ```
   interface AxisBaseOption extends ComponentOption, AnimationOptionMixin {
      ...
       axisLabel?: AxisLabelOption;
   }
   ```
   And AxisLabelOption is defined as:
   ```
   interface AxisLabelOption extends Omit<TextCommonOption, 'color'> {
       ...
       formatter?: AxisLabelFormatterOption | TimeAxisLabelFormatterOption;
      ...
   ```
   
   In 5.2.1 it looks different:
   ```
   interface AxisLabelOption<TType extends OptionAxisType> extends AxisLabelBaseOption {
       formatter?: LabelFormatters[TType];
   }
   
   declare type LabelFormatters = {
       value: AxisLabelValueFormatter | string;
       log: AxisLabelValueFormatter | string;
       category: AxisLabelCategoryFormatter | string;
       time: TimeAxisLabelFormatterOption;
   };
   ```
   
   That is not compatible anymore. I got a lot of compilation errors if I switch from 5.2.0 to 5.2.1. 
   
   Can you provide an example for 5.2.1 to configure a formatter with the signature: 
   `(value: number, index: number) => string`
   
   I was not successful to migrate the old formatter working in 5.2.0.
   
   Thanks a lot and keep on doing such a great work! (it is an amazing framework 😉)
   Thomas
   


-- 
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] pissang commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

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


   @lauritziu `axisLabel.formatter` is defined in the different types of axes. It's not in the base option.


-- 
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] pissang edited a comment on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15941:
URL: https://github.com/apache/echarts/issues/15941#issuecomment-951497143


   @isaaclyman It's because the type of axis option is refined in 5.2.1. `data` property only available on the `type: 'category'` axis now. Which matches the actual behavior


-- 
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] e-cloud commented on issue #15941: Breaking change from 5.2.0 to 5.2.1: AxisBaseOption.data no longer available

Posted by GitBox <gi...@apache.org>.
e-cloud commented on issue #15941:
URL: https://github.com/apache/echarts/issues/15941#issuecomment-986456865


   The key problem is echarts is using Typescript v3.8, while some users are using Typescript v4.x. TS v4 provides more types inference.


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