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/04/24 07:19:18 UTC

[GitHub] [incubator-echarts] wf123537200 opened a new pull request #12487: feat(line): hide splitLine, close #12456

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


   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   append a params as follow
   ```
   splitLine: {
                    ...
                       showAsAxis: true,
                    ...
                   }
   ```
   when set the params,  the splitLine will only show when the axisLabel.formatter return !value = true
   
   
   
   ### Fixed issues
   
   <!--
   - #12456: xAxis. splitLine Cannot display only at the scale location where the label is located实现坐标轴在 grid 区域中的分隔线只显示在标签的位置
   -->
   
   
   ## Details
   
   ### Before: What was the problem?
   
   the split line will show whatever the xAisx is show
   ![image](https://user-images.githubusercontent.com/5130528/80185374-cfc35200-863e-11ea-8e3b-229ebe3fc4df.png)
   
   
   ### After: How is it fixed in this PR?
   
   the split line will show at the xAisx scale location
   ![image](https://user-images.githubusercontent.com/5130528/80185353-c89c4400-863e-11ea-9ea4-88711797b2a6.png)
   
   
   ## Usage
   
   ### Are there any API changes?
   
   - [x] The API has been changed.
   
   append params at axis.splitLine: 
   ```
   splitLine: {
                    ...
                       showAsAxis: true,
                    ...
                   }
   ```
   
   ### Related test cases or examples to use the new APIs
   
   test/axis-interval-splitLine.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] wf123537200 commented on a change in pull request #12487: feat(line): hide splitLine

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



##########
File path: src/component/axis/CartesianAxisView.js
##########
@@ -137,7 +142,7 @@ var CartesianAxisView = AxisView.extend({
                     y2: p2[1]
                 },
                 style: zrUtil.defaults({
-                    stroke: lineColors[colorIndex]
+                    stroke: (viewLabels && viewLabels[i] && !viewLabels[i].formattedLabel ? 'transparent' : lineColors[colorIndex])

Review comment:
       
   I was worried about causing side effects before, so I did n’t do that.
   
   now the iteration not execute with ```continue``` 




----------------------------------------------------------------
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] susiwen8 commented on a change in pull request #12487: feat(line): hide splitLine

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



##########
File path: src/component/axis/CartesianAxisView.js
##########
@@ -137,7 +142,7 @@ var CartesianAxisView = AxisView.extend({
                     y2: p2[1]
                 },
                 style: zrUtil.defaults({
-                    stroke: lineColors[colorIndex]
+                    stroke: (viewLabels && viewLabels[i] && !viewLabels[i].formattedLabel ? 'transparent' : lineColors[colorIndex])

Review comment:
       I don't think there gonna have side affect,  `silent` might concerning but it has been set to `true`, which won't dispatch event.




----------------------------------------------------------------
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 #12487: feat(line): hide splitLine, close #12456

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


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


----------------------------------------------------------------
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] wf123537200 commented on pull request #12487: feat(line): hide splitLine

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


   @susiwen8 thanks a lot, and i think the [992ea8b](https://github.com/apache/incubator-echarts/pull/12487/commits/992ea8bafe88fb2820e1157d0511fd13566d33b1) may solution the performance problem


----------------------------------------------------------------
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] susiwen8 commented on a change in pull request #12487: feat(line): hide splitLine

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



##########
File path: src/component/axis/CartesianAxisView.js
##########
@@ -137,7 +142,7 @@ var CartesianAxisView = AxisView.extend({
                     y2: p2[1]
                 },
                 style: zrUtil.defaults({
-                    stroke: lineColors[colorIndex]
+                    stroke: (viewLabels && viewLabels[i] && !viewLabels[i].formattedLabel ? 'transparent' : lineColors[colorIndex])

Review comment:
       For better performance, I think we should not draw transparent line, if condition were matched, just don't execute this iteration. 




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