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

Feature/metrics chart #4

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

SivaprasadAluri
Copy link
Owner

Description

Added Metrics Charts Styles Panel

Issues Resolved

Metrics Chart opensearch-project#872

@SivaprasadAluri SivaprasadAluri force-pushed the feature/metricsChart branch 3 times, most recently from 6956037 to febd159 Compare September 29, 2022 05:39
AGGREGATIONS,
GROUPBY,
METRICS_AGGREGATION_OPTIONS,
numericalTypes,

Choose a reason for hiding this comment

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

Change numericalTypes to NUMERICAL_TYPES. This change has been merged to main. Please check.

...userConfigs?.dataConfig,
});
}
}, [userConfigs, userConfigs?.dataConfig, visualizations.vis.name]);

Choose a reason for hiding this comment

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

Do we need the dependency of userConfigs also?

top: 20px;
text-align: center;
width: '100%'
}

Choose a reason for hiding this comment

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

Add new line at the end of file

@SivaprasadAluri SivaprasadAluri force-pushed the feature/metricsChart branch 2 times, most recently from 4655498 to d8845dd Compare October 3, 2022 02:52
};

const handleServiceRemove = (index: number, name: string) => {
const arr = [...configList[name]];

Choose a reason for hiding this comment

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

Provide proper name for the variable arr.

<EuiTitle size="xxs">
<h3>Series</h3>
</EuiTitle>
{getCommonUI(configList.series, 'series')}

Choose a reason for hiding this comment

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

Replace series with the constant [AGGREGATIONS]

const {
data,
metadata: { fields },
} = visualizations.data.rawVizData;

Choose a reason for hiding this comment

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

Can destructure the object as in other visualizations.

<div className="metricsContainer">
<h4 className="metricTitle"> {dataTitle} </h4>
<div>
{dataConfig && dataConfig?.series?.length > 0 ? (

Choose a reason for hiding this comment

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

Try to access series with a constant

</div>
<div className="aggregateLabel" style={{ fontSize: fontSize / 2 + 'px' }}>
<span> {aggFunction.label} </span>
{metric.alias !== '' ? metric.alias : metric.label}

Choose a reason for hiding this comment

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

From alias everything is changed to custom label. For consistency please change it everywhere required.

Copy link

@ruchika-narang ruchika-narang left a comment

Choose a reason for hiding this comment

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

Please check the minor comments. Rest looks good to me

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