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/07/23 09:13:54 UTC

[GitHub] [incubator-echarts] plainheart opened a new pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

plainheart opened a new pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013


   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [ ] new feature
   - [x] others
   
   
   
   ### What does this PR do?
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   According to the suggested design change in #12931, add a new option named `bolderWhenHover`(not sure, may be a better one ) for line series to specify whether the chart should be bolder when it's in emphasis state.
   
   ### Fixed issues
   
   - #12931
   
   
   ## Details
   
   ### Before: What was the problem?
   
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   The line series won't be bolder to highlight when hovering on it unless users specify `emphasis.lineStyle.width`.
   
   ### After: How is it fixed in this PR?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   By default, the line series will be bolder when hovering on it. But if users set `emphasis.lineStyle.width` manually, it will be bolder as they specified.
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   ![2020-07-23 17 09 35](https://user-images.githubusercontent.com/26999792/88269957-7c2cd700-cd07-11ea-9725-475ed78b44fc.gif)
   
   
   
   ## Usage
   
   ### Are there any API changes?
   
   - [x] The API has been changed.
   
   <!-- LIST THE API CHANGES HERE -->
   Added a new option `bolderWhenHover`, default is `true`.
   
   ### Related test cases or examples to use the new APIs
   
   Refer to `test/line-boldWhenHover.html`
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### Other information
   


----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459920760



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       Looks good, it's just for emphasis state?




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459379574



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       If users specify `emphasis.bolder` is `false` and `emphasis.lineStyle.width` to `5`, then should the line be bolder with a width of 5 pixels when hovering on it?
   Like this
   ```js
   emphasis: {
       focus: 'series',
       bolder: false,
       lineStyle: {
           width: 5
       }
   }
   ```




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459379574



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       If users specify `emphasis.bolder` is `false` and `emphasis.lineStyle.width` to `5`, then should the line be bolder with a width of 5 pixel when hovering on it?
   Like this
   ```js
   emphasis: {
       focus: 'series',
       bolder: false,
       lineStyle: {
           width: 5
       }
   }
   ```




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460382434



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       I've tweaked the option `emphasis.bolder` to `emphasis.lineStyle.width: bolder`, but I don't make changes about the `select` state since I find the line series doesn't support this state.




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459368334



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       Sounds good! I will tweak it later.




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459872522



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       I think we can just ignore `emphasis.bolder` if `emphasis.lineStyle.width` is specified.




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460382434



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       I've tweaked the option `emphasis.bolder` to `emphasis.lineStyle.width: bolder` and I don't make changes about the `select` state since I find the line series doesn't support this state.




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460493015



##########
File path: src/chart/line/LineView.ts
##########
@@ -544,11 +544,18 @@ class LineView extends ChartView {
             {
                 fill: 'none',
                 stroke: visualColor,
-                lineJoin: 'bevel'
+                lineJoin: 'bevel' as CanvasLineJoin
             }
         ));
 
         setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');
+
+        const shouldBolderOnEmphasis = seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder';
+        if (shouldBolderOnEmphasis) {
+            const emphasisLineStyle = polyline.getState('emphasis').style;
+            emphasisLineStyle.lineWidth = lineStyleModel.get('width') + 1;
+        }

Review comment:
       Yes, I agree with you. We should indeed do this if `lineStyle.width` can also be a semantic value in the future.




----------------------------------------------------------------
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 pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#issuecomment-662902242


   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/incubator-echarts/wiki/How-to-make-a-pull-request).
   
   The pull request is marked to be `PR: author is committer` because you are a committer of this project.


----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459379574



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       If users specify `emphasis.bolder` is `false` and `emphasis.lineStyle.width` to `5`, then should the line be bolder with a width of 5 pixel when hovering on it?




----------------------------------------------------------------
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] plainheart commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460370399



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       @pissang I found it seems the line series has not implemented the logic about select state?




----------------------------------------------------------------
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] pissang edited a comment on pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#issuecomment-662942112






----------------------------------------------------------------
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] pissang commented on pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#issuecomment-662942112


   The screenshot seems nice!


----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459872522



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       <del>I think we can just ignore `emphasis.bolder` if `emphasis.lineStyle.width` is specified.</del>
   
   Another thought just comes in my mind: can `emphasis.lineStyle.width` be a semantic value like `'bolder'`?
   
   ```ts
   emphasis: {
     lineStyle: {
       width: 'bolder'
     }
   }
   ```
   
   Just like font-weight in CSS. @100pah What do you think about this?
   
   We already have a similar configuration in sankey chart.
   
   ```
   lineStyle: {
     color: 'source' | 'target' | 'gradient'
   }
   ```
   
   By which link color will use the color of source/target node, or even a gradient color between them.




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459872522



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       <del>I think we can just ignore `emphasis.bolder` if `emphasis.lineStyle.width` is specified.</del>
   
   Another thought just comes in my mind: can `emphasis.lineStyle.width` be a semantic value like `'bolder'`?
   
   ```ts
   emphasis: {
     lineStyle: {
       width: 'bolder'
     }
   }
   ```
   
   Just like font-weight in CSS. @100pah What do you think about this?




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460409283



##########
File path: src/chart/line/LineView.ts
##########
@@ -544,11 +544,18 @@ class LineView extends ChartView {
             {
                 fill: 'none',
                 stroke: visualColor,
-                lineJoin: 'bevel'
+                lineJoin: 'bevel' as CanvasLineJoin
             }
         ));
 
         setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');
+
+        const shouldBolderOnEmphasis = seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder';
+        if (shouldBolderOnEmphasis) {
+            const emphasisLineStyle = polyline.getState('emphasis').style;
+            emphasisLineStyle.lineWidth = lineStyleModel.get('width') + 1;
+        }

Review comment:
       I think it's more robust to use `polyline.style.width`. Because it's an accurate computed value from `lineStyleModel.get('width')`.  For example in the future `lineStyleModel.get('width')` can also be a semantic value
   
   ```js
   emphasisLineStyle.lineWidth = polyline.style.width + 1
   ```




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459872522



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       <del>I think we can just ignore `emphasis.bolder` if `emphasis.lineStyle.width` is specified.</del>
   
   Another thought just comes in my mind: can `emphasis.lineStyle.width` be a semantic value like `'bolder'`?
   
   ```ts
   emphasis: {
     lineStyle: {
       width: 'bolder'
     }
   }
   ```
   
   Just like font-weight in CSS. @100pah What do you think about this?
   
   We already have similar configuration in sankey chart.
   
   ```
   lineStyle: {
     color: 'source' | 'target' | 'gradient'
   }
   ```
   
   By which link color will use the color of source/target node, or even a gradient color between them.




----------------------------------------------------------------
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 pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#issuecomment-664083643


   Congratulations! Your PR has been merged. Thanks for your contribution! 👍


----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460408238



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       Sure, I think it's good.




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459872522



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       I think we can just ignore `emphasis.bolder` if `emphasis.lineStyle.width` is specified.
   
   Another thought just comes in my mind: can `emphasis.lineStyle.width` be a semantic value like `'bolder'`?
   
   ```ts
   emphasis: {
     lineStyle: {
       width: 'bolder'
     }
   }
   ```
   
   Just like font-weight in CSS. @100pah What do you think about this?




----------------------------------------------------------------
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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r460362679



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       @plainheart Perhaps `select` can also have that?

##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       @plainheart Perhaps `select` state can also have 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.

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] pissang commented on a change in pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013#discussion_r459366746



##########
File path: src/chart/line/LineSeries.ts
##########
@@ -103,6 +103,8 @@ export interface LineSeriesOption extends SeriesOption<LineStateOption, ExtraSta
     showAllSymbol?: 'auto'
 
     data?: (LineDataValue | LineDataItemOption)[]
+
+    bolderWhenHover?: boolean

Review comment:
       Perhaps it can be `emphasis: { bolder?: boolean }`.
   Which is similar to https://github.com/apache/incubator-echarts/blob/next/src/chart/scatter/ScatterSeries.ts#L49 




----------------------------------------------------------------
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] pissang merged pull request #13013: feat: make line bolder when line is in emphasis state, designed by #12931.

Posted by GitBox <gi...@apache.org>.
pissang merged pull request #13013:
URL: https://github.com/apache/incubator-echarts/pull/13013


   


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