-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1
base: main
Are you sure you want to change the base?
Conversation
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a empty line below. You can also use Prettify to format this file.
id="discover.noResults.queryMayNotMatchTitle" | ||
values={Object {}} | ||
> | ||
Your query may not match anything in the current time range, or there may not be any data at all in the currently selected time range. Try change time range, query filters or choose different time fields | ||
Your query may not match anything in the current time range, or there may not be any data at all in | ||
the currently selected time range. Try change time range, query filters or choose different time fields | ||
</FormattedMessage> | ||
</p> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't push this snapshot. Please revert this file to its past state.
@@ -43,6 +43,7 @@ | |||
|
|||
::-webkit-scrollbar { | |||
width: 10px; | |||
height: 10px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the height.
initialIsOpen | ||
id="configPanel__legend" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use htmlIdGenerator for id
} else if (visualizations.vis.name === visChartTypes.Metrics) { | ||
setConfigList({ | ||
metrics: [initialConfigEntry], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please take a pull of latest code, we are using switch case here in place of if-else
</EuiFlexItem> | ||
</> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have changed this file. Please update the config list according to valueOptions
id: 'fontsize', | ||
name: 'Metric FontSize', | ||
editor: ConfigLegend, | ||
mapTo: 'FontSize', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use camel-case for mapTo value
const dataConfigTab = | ||
visualizations.data?.rawVizData?.metrics?.dataConfig && | ||
visualizations.data.rawVizData.metrics.dataConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a pull of the latest code with valueOptions and check whether this still works or not.
if (aggregate === 'COUNT') { | ||
return data[label].length; | ||
} else if (aggregate === 'AVERAGE') { | ||
return meanBy(data[label]).toFixed(2); | ||
} else if (aggregate === 'MAX') { | ||
return (max(data[label]) as number).toFixed(2); | ||
} else if (aggregate === 'MIN') { | ||
return (min(data[label]) as number).toFixed(2); | ||
} else if (aggregate === 'SUM') { | ||
return sum(data[label]).toFixed(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use switch case here
Signed-off-by: SivaprasadAluri <[email protected]>
Description
Added Metrics Chart Styles Panel
Issues Resolved
opensearch-project#872