-
Notifications
You must be signed in to change notification settings - Fork 842
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
Some quick EuiSeriesChart
additions
#1198
Conversation
Only add space beween content and actions if both `body` and `actions` exist.
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.
Looks good.
@@ -11,6 +11,7 @@ export function VisualizationColorType(props, propName) { | |||
return new Error('Color must be a valid hex color string in the form #RRGGBB'); | |||
} | |||
if (!VISUALIZATION_COLORS.includes(color.toUpperCase())) { | |||
console.warn('Prefer safe EUI Visualization Colors.'); | |||
// Suppress warning for now as it can overwhelm the console for custom charts | |||
// console.warn('Prefer safe EUI Visualization Colors.'); |
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 think it's OK to just remove this. We'll end up using the palette service for something like this anyway.
@@ -4,6 +4,7 @@ | |||
- Fixed issue with unselected tabs and aria-controls attribute in EuiTabbedContent | |||
- Added `tag` icon ([#1188](https://github.com/elastic/eui/pull/1188)) | |||
- Replaced `logging` app icon ([#1194](https://github.com/elastic/eui/pull/1194)) | |||
- Added some opacity options to `EuiLineSeries` and `EuiAreaSeries` ([#1198](https://github.com/elastic/eui/pull/1198)) |
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.
@chandlerprall should we label these under the experimental subheader? Or only do that for experimental breaks?
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'm fine with either. The chart themselves were/are flagged as experimental, and these changes themselves are not experimental in of themselves.
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.
Yeah that was kind of my line of thought too
onSeriesMouseOut={this._onSeriesMouseOut} | ||
style={{ | ||
cursor: isMouseOverSeries && onSeriesClick ? 'pointer' : 'default', | ||
opacity: fillOpacity, |
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.
react-viz's AreaSeries supports an opacity
prop, same as their LineSeries. Did you try passing opacity
through?
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 did, and it didn't work
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 poked around, looks like react-viz overrides the opacity value for some series items somewhere in its internals, so that's cool.
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.
LGTM; pulled and played with opacity in docs locally
Summary
1. Suppressing non-EUI vis color warning
I commented out the console warning (and tests) that displayed if you passed a color that is not one of the EUI vis palette colors. Every chart render would spit out this warning and would really overload the console output. I only commented it for now to allow us to revisit if necessary.
2. Added some opacity options to line and area series’
I kept the defaults of
1
but this helps to be able to lessen the line series border and area series fill.Ex:
3. Using the visualize app logo for empty prompt and vertically centering
Also, changed some spacing to be conditional EuiEmptyPrompt (only add space between content and actions if both
body
andactions
exist).Before
After
Checklist
- [ ] Documentation examples were added- [ ] This was checked for breaking changes and labeled appropriately- [ ] This was checked against keyboard-only and screenreader scenarios