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: Metrices and Dimensions, Legend, Chart styles features implementation on config panel #2

Merged

Conversation

rinku-kumar-psl
Copy link
Collaborator

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

Metrix and dimension UI Integration on Data Configuration.

Issues Resolved

[List any issues this PR will resolve]
opensearch-project#697 opensearch-project/dashboards-observability#125

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

Check List

  • New functionality includes above listed Legend and Chart styles features in the Data config panel and Metrix and Dimension Integration.
    • 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

Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line.tsx
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts

# Conflicts:
#	dashboards-observability/common/constants/shared.ts
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_style_slider.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_button_group.tsx
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_legend.tsx
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_style_slider.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/visualizations/charts/lines/line.tsx
#	dashboards-observability/public/components/visualizations/charts/lines/line_type.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/common/constants/shared.ts
#	dashboards-observability/common/types/explorer.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

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

# Conflicts:
#	dashboards-observability/public/components/event_analytics/utils/utils.tsx
…from chartOption

Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/common/constants/shared.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts

# Conflicts:
#	dashboards-observability/common/constants/shared.ts
#	dashboards-observability/common/types/explorer.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/utils/utils.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_button_group.tsx

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_style_slider.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/utils/utils.tsx

# Conflicts:
#	dashboards-observability/common/constants/shared.ts
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/.cypress/integration/1_event_analytics.spec.js
#	dashboards-observability/.cypress/utils/event_constants.js

# Conflicts:
#	dashboards-observability/.cypress/integration/1_event_analytics.spec.js

# Conflicts:
#	dashboards-observability/.cypress/integration/1_event_analytics.spec.js
Signed-off-by: rinku-kumar-psl <[email protected]>
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/common/constants/explorer.ts
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx
Signed-off-by: rinku-kumar-psl <[email protected]>

# Conflicts:
#	dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_config_panel_item.tsx
if (!vizState?.style || vizState?.style === "lines") {
return schemas.filter((schema: IConfigPanelOptionSection) => schema.mapTo !== 'pointSize');
}
if (vizState?.style === "bar") {
Copy link
Owner

Choose a reason for hiding this comment

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

do we need this in config line chart file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @abasatwar, As we can switch Line traces between BAR and LIne, So this check is there.

multiMetrics = {
...multiMetrics,
[`yaxis${index + 1}`]: {
// title: `yaxis${index + 1} title`,
Copy link
Owner

Choose a reason for hiding this comment

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

remove commented code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks!
Added TODO comment.

@abasatwar abasatwar self-requested a review June 24, 2022 12:04
Copy link
Owner

@abasatwar abasatwar left a comment

Choose a reason for hiding this comment

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

looks good.

@abasatwar abasatwar merged commit af895be into abasatwar:sprint1 Jun 24, 2022
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.

2 participants