Skip to content

Commit

Permalink
Bar chart: Legend, Chart styles, and Color Theme features implementat…
Browse files Browse the repository at this point in the history
…ion on config panel - 697 (opensearch-project#780)

* mode, orientation and rotate labels implementation under Chart style for Bar chart

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

* LineWidth and Fill-opacity changes

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

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

* Bar Group Width, Bar Width changes and rotated label hiding issue resolved

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

* corner cases handled for bar with and group Width and conditionally rendered rotate label UI

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

* Bar chart legend and color theme changes

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

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

* Snapshots updated

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

* empty line added

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

* review comment addressed

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

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

* snapshot updated

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

* PR review comment addressed.

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

* add button constant added

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

* changed rgba to rgb in bar.tsx

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

* snapshot updated

Signed-off-by: rinku-kumar-psl <[email protected]>
  • Loading branch information
rinku-kumar-psl authored Jun 23, 2022
1 parent 8fa4ad6 commit 700badf
Show file tree
Hide file tree
Showing 18 changed files with 9,036 additions and 1,025 deletions.
1 change: 1 addition & 0 deletions common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const REDUX_EXPL_SLICE_COUNT_DISTRIBUTION = 'countDistributionVisualizati
export const PLOTLY_GAUGE_COLUMN_NUMBER = 5;
export const APP_ANALYTICS_TAB_ID_REGEX = /application-analytics-tab.+/;
export const DEFAULT_AVAILABILITY_QUERY = 'stats count() by span( timestamp, 1h )';
export const ADD_BUTTON_TEXT = '+ Add color theme';

export const VIZ_CONTAIN_XY_AXIS = [
visChartTypes.Bar,
Expand Down
23 changes: 22 additions & 1 deletion common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,25 @@ export const LIVE_OPTIONS = [
},
];

export const LIVE_END_TIME ='now';
export const LIVE_END_TIME ='now';
export interface DefaultChartStylesProps {
DefaultMode: string,
Interpolation: string,
LineWidth: number,
FillOpacity: number,
MarkerSize: number,
ShowLegend: string,
LegendPosition: string
};

export const DefaultChartStyles: DefaultChartStylesProps = {
DefaultMode: 'lines',
Interpolation: 'spline',
LineWidth: 2,
FillOpacity: 40,
MarkerSize: 5,
ShowLegend: 'show',
LegendPosition: 'v'
}

export const FILLOPACITY_DIV_FACTOR = 200;
4 changes: 3 additions & 1 deletion common/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,11 @@ export interface IConfigPanelOptions {
export interface IConfigPanelOptionSection {
name: string;
component: null;
mapTo: 'mode';
mapTo: string;
props?: any;
isSingleSelection?: boolean;
defaultState?: number;
eleType?: string;
}

export interface IVisualizationTypeDefination {
Expand Down
Loading

0 comments on commit 700badf

Please sign in to comment.