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

Line chart: Legend, Chart styles features implementation on config panel - 697 #784

Conversation

rinku-kumar-psl
Copy link
Contributor

Description

[Describe what this change achieves]

The below features are implemented in the config panel in this PR:

Legend:

  • Show Legend
  • Position

Chart styles:

  • Mode (Line, Bars, Points, Lines+Points)
  • Interpolation (Linear, Smooth, Step Before, Step After)
  • Line Width
  • Fill Opacity
  • Point Size

Here are the visuals and implementation of new Data configs on the Line chart as per the issue #697
#697 (comment)

Issues Resolved

[List any issues this PR will resolve]
#697

Check List

  • New functionality includes above listed Legend and Chart styles features in the Data config panel.
    • All tests that pass, including unit test, and integration test, except a few test cases, are failing at my end which is not related to this functionality.
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@spattnaik @abasatwar

Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line.tsx
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line.tsx
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line.tsx
…from chartOption

Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
Signed-off-by: rinku-kumar-psl <rinku_kumar@persistent.com>
@rinku-kumar-psl rinku-kumar-psl requested a review from a team as a code owner June 8, 2022 11:42
@codecov-commenter
Copy link

Codecov Report

Merging #784 (8e742ac) into main (4fa6e82) will decrease coverage by 0.16%.
The diff coverage is 41.33%.

@@             Coverage Diff              @@
##               main     #784      +/-   ##
============================================
- Coverage     58.20%   58.04%   -0.17%     
  Complexity      291      291              
============================================
  Files           244      248       +4     
  Lines          8018     8089      +71     
  Branches       1647     1671      +24     
============================================
+ Hits           4667     4695      +28     
- Misses         3177     3220      +43     
  Partials        174      174              
Flag Coverage Δ
dashboards-observability 52.50% <41.33%> (-0.17%) ⬇️
opensearch-observability 71.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ashboards-observability/common/constants/shared.ts 100.00% <ø> (ø)
...panes/config_controls/config_line_chart_styles.tsx 3.33% <3.33%> (ø)
...nel/config_panes/config_controls/config_legend.tsx 7.69% <7.69%> (ø)
...nfig_panes/config_controls/config_style_slider.tsx 33.33% <33.33%> (ø)
...nfig_panes/config_controls/config_button_group.tsx 50.00% <50.00%> (ø)
.../public/components/event_analytics/utils/utils.tsx 42.47% <100.00%> (+3.22%) ⬆️
...ic/components/visualizations/charts/lines/line.tsx 70.68% <100.00%> (+11.59%) ⬆️
...omponents/visualizations/charts/lines/line_type.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fa6e82...8e742ac. Read the comment docs.

<EuiSpacer size="s" />
<div style={{ width: "fit-content" }}>
<EuiButtonGroup
id={uniqueId('button-select-')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use html id generator moving forward for ids, and gradually replace all other uniqueId with that. Guide, html id generator

@mengweieric
Copy link
Collaborator

mengweieric commented Jun 8, 2022

This PR contains some similar things from this PR, could you refer to that PR and address the similar things? thanks

@rinku-kumar-psl
Copy link
Contributor Author

As added these changes in Sprint1 PR and it's merged now in main. So, closing this PR.
PR: #824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants