-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vis: Default Editor] EUIficate 'Metrics & Axis' tab #43772
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
flash1293
approved these changes
Sep 12, 2019
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 besides always keeping "Show dots" enabled as discussed offline.
💚 Build Succeeded |
cchaos
approved these changes
Sep 13, 2019
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 thanks @maryia-lapata!
💚 Build Succeeded |
sulemanof
requested review from
sulemanof
and removed request for
sulemanof
September 13, 2019 11:10
sulemanof
approved these changes
Sep 13, 2019
maryia-lapata
added a commit
to maryia-lapata/kibana
that referenced
this pull request
Sep 13, 2019
* EUIficate pointe-series and grid * Apply TS * Show grid on a panel * Remove extra space * Add TS * Use BasicOptions * Adjust func test * Add dataTestSubj prop to SelectOption * Use id instead of data-sest-subj * Disable show x-axis lines when there is histogram agg * Add tooltip for disabled 'Show x-axis lines' config * Add series_options.tsx * Migrate series * Improve changeValueAxis * Create CategoryAxisPanel * Create ValueAxesPanel * Create CustomExtentsOptions * File renaming * Use TruncateLabelsOption * Set min value * Add validation * Refactoring * Move types upper * Convert series logic * Convert valueAxes logic * Rename function * Add validation and refactoring * Adjust styles * Fix rotates * Apply config for other vis * Remove old directives * Fix useHook usage * Update vislib_vis_type.js * Fix * Move Threshold line panel into a separate component * Remove unused translations * Apply ui suggestions * Update functional tests * Remove angular unit test * Refactoring * Fix dependencies * Refactoring * Add validation * Add validation for other vis * Refactoring of onPositionChanged handler * Refactoring of addValueAxis * Get rid of a useEffect * Refactoring of updateAxisTitle * Update useCallback * Refactoring * Refactoring of collections config * Refactoring of setChartValueByIndex and setValueAxisByIndex * Update metrics_axes_options.tsx * Watch current tab for correct accordion height * Revert axis title logic * Fix axis id and name number * Fix code review comments * Fix functional tests * Update visualize_page.js * Move option tabs in common * Fix code review comments * Update index.tsx * Refactoring * Fix merge conflict * Show ThresholdPanel when it's configured * Fix passing a current tab to vis-options * Localize 'Count' text * Pass one axis to CategoryAxisPanel * Fix y-axis name number when x-axis position changed * Fix Y-axis name number when position Y-axis changed * Fix refresh loop * Re-organize controls * Apply code review comments * Refactoring * Fix extents empty value * Update y_extents.tsx * Fix code review comments * Fix updating several seriesParams when removing axis * Add thresholdLine config to horizontal bar * Refactoring * Reset grid.valueAxis when the axis deleted * Fix refresh loop * Set interpolate config for line * Enable "show dots"
maryia-lapata
added a commit
that referenced
this pull request
Sep 13, 2019
…45621) * [Vis: Default Editor] EUIficate 'Metrics & Axis' tab (#43772) * EUIficate pointe-series and grid * Apply TS * Show grid on a panel * Remove extra space * Add TS * Use BasicOptions * Adjust func test * Add dataTestSubj prop to SelectOption * Use id instead of data-sest-subj * Disable show x-axis lines when there is histogram agg * Add tooltip for disabled 'Show x-axis lines' config * Add series_options.tsx * Migrate series * Improve changeValueAxis * Create CategoryAxisPanel * Create ValueAxesPanel * Create CustomExtentsOptions * File renaming * Use TruncateLabelsOption * Set min value * Add validation * Refactoring * Move types upper * Convert series logic * Convert valueAxes logic * Rename function * Add validation and refactoring * Adjust styles * Fix rotates * Apply config for other vis * Remove old directives * Fix useHook usage * Update vislib_vis_type.js * Fix * Move Threshold line panel into a separate component * Remove unused translations * Apply ui suggestions * Update functional tests * Remove angular unit test * Refactoring * Fix dependencies * Refactoring * Add validation * Add validation for other vis * Refactoring of onPositionChanged handler * Refactoring of addValueAxis * Get rid of a useEffect * Refactoring of updateAxisTitle * Update useCallback * Refactoring * Refactoring of collections config * Refactoring of setChartValueByIndex and setValueAxisByIndex * Update metrics_axes_options.tsx * Watch current tab for correct accordion height * Revert axis title logic * Fix axis id and name number * Fix code review comments * Fix functional tests * Update visualize_page.js * Move option tabs in common * Fix code review comments * Update index.tsx * Refactoring * Fix merge conflict * Show ThresholdPanel when it's configured * Fix passing a current tab to vis-options * Localize 'Count' text * Pass one axis to CategoryAxisPanel * Fix y-axis name number when x-axis position changed * Fix Y-axis name number when position Y-axis changed * Fix refresh loop * Re-organize controls * Apply code review comments * Refactoring * Fix extents empty value * Update y_extents.tsx * Fix code review comments * Fix updating several seriesParams when removing axis * Add thresholdLine config to horizontal bar * Refactoring * Reset grid.valueAxis when the axis deleted * Fix refresh loop * Set interpolate config for line * Enable "show dots" * Fix functional test
💔 Build Failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Vis Editor
Visualization editor issues
release_note:skip
Skip the PR/issue when compiling release notes
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
v7.5.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
EUIfication of options tab
Metrics & Axes
in Area/Bar/Line vis.Part of #38273.
For better understanding of components structure I added a schema in
Tech details
section.This PR contains the following changes:
Euification of
vislib-series
,vislib-value-axes
andvislib-category-axis
directives.for vis config:
collections
andoptionTabs
into utils files;Metric & axes
andPanel settings
were localized;thresholdLine
config inHistogram bar
;lineWidth
forseriesParams
as 2;for
PointSeriesOptions
:GridOptions
toGridPanel
;ThresholdLine
setting into a separate componentfor common components:
data-test-subj
,disabled
,isInvalid
anderror
props toNumberInputOption
;disabled
prop toTruncateLabelsOption
;data-test-subj
prop toTextInputOption
;SelectOption
allows value as number too (Rotate needs this);labels were update using sentence case.
remove unused style
.visEditorSidebar__formTitle
;old unit tests were removed. I'll add jest unit tests in a separate PR.
Screenshots
Line:
|
Area:
3a) Disabled
Show axes lines and labels
3b) Custom extends
3c) Validation
Tech details
1. MetricsAxisOptions
2. ChartOptions
Options3. ValueAxisOptions
Use cases
1. From #24176 about Axis title:
- When an axis title is set manually, it will always override the custom label set on the agg - Otherwise, the axis title will be set to whatever the custom label is on the agg - If no custom label is specified on the agg, the axis title will be set to the default for the agg (i.e. whatever `aggConfig.makeLabel()` returns) - If the agg type is changed, axis titles are reset to `aggConfg.makeLabel()`
2. Y-Axis name should be changed to opposite when X-axis position is changed:
3. Y-Axis name should be changed when this Y-axis position is changed:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers