-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Define bar width if bar chart contains only data for a single date #8354
Conversation
@@ -31,7 +31,7 @@ export type VisualizationComponentProps = { | |||
config: AggregationWidgetConfig, | |||
data: { [string]: Rows, events?: Events }, | |||
editing?: boolean, | |||
effectiveTimerange: TimeRange, | |||
effectiveTimerange: AbsoluteTimeRange, |
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.
As far as I know the effective time range is always an AbsoluteTimeRange
. Or is there a case were it can be another type?
@@ -2,6 +2,9 @@ | |||
|
|||
type ConfigType = { [string]: mixed }; | |||
|
|||
export const DateType = 'time'; | |||
export const ValuesType = 'values'; |
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.
I will create a follow up PR to replace all related hard coded values.
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.
Good work, fixes the issue for now. As mentioned before, we should remove the workaround by returning the bucket size in the backend, but this requires further work and this fix does it for the meantime.
As described in #7167 a bar chart with a time range and only one search result, results in one very small bar. This PR is fixing the problem by defining a width for the bar. The width can't be defined in px, it has to be the unit of the x axis (in this case ms).
Fixes #7167
Screenshots (if appropriate):
Types of changes