-
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
Replace flot with elastic-chart in Timelion #81565
Conversation
@elasticmachine merge upstream |
src/plugins/vis_type_timelion/public/components/area_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/area_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/area_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/bar_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx
Outdated
Show resolved
Hide resolved
{chart[0]._global && chart[0]._global.yaxes ? ( | ||
chart[0]._global.yaxes.map((axis: IAxis, index: number) => { | ||
return ( | ||
<Axis | ||
key={index} | ||
id={axis.position + axis.axisLabel} | ||
title={axis.axisLabel} | ||
position={axis.position} | ||
tickFormat={axis.tickFormatter} | ||
gridLine={{ | ||
stroke: 'rgba(125,125,125,0.3)', | ||
visible: true, | ||
}} | ||
domain={axis.domain as YDomainRange} | ||
/> | ||
); | ||
}) | ||
) : ( | ||
<Axis | ||
id="left" | ||
position={Position.Left} | ||
gridLine={{ | ||
stroke: 'rgba(125,125,125,0.3)', | ||
visible: true, | ||
}} | ||
/> |
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.
it's too difficult to read. Maybe we should name it somehow or move into separate component?
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 don't think it's needed. Create a separate document just for rendering Axis it's strange for me. Maybe do you want that I create s separate function for rendering Axis?
@elasticmachine merge upstream |
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.
Thanx Vlad for this PR. Some comments from my side:
- It seems that Timelion app is not working anymore
src/plugins/vis_type_timelion/public/components/_timelion_vis.scss
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/area_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/area_series/index.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timelion/public/components/timelion_vis_component.tsx
Outdated
Show resolved
Hide resolved
@stratoula, I checked TSVB and Lens with static value and get the following: TSVB: As you can see elastic-charts works with static value everywhere like in timelion now. I understand that is not like before but I think we can it leave this behavior so that we will be consistent. Also about legend, elastic-chart show in legend the last value of graphic if we don't have cursor. As we have name (50) and value (50) we see twice it. The similar behavior you can see in TSVB: |
@elasticmachine merge upstream |
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.
Ok I see, thanx @VladLasitsa I think we can merge it as it is.
LGTM, I have tested it multiple times and taking under consideration that we also have the fallback on the old implementation I think it is ready to be merged 🎉
@elastic/kibana-telemetry can you please take a look? 🙇♀️ |
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.
telemetry changes LGTM. mikhail already approved this so we are not blocking the PR. seems it needs a review from the kibana-design team
Correct! @elastic/kibana-design we need your review ❤️ |
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! Tested locally
@elastic/kibana-design please have a look, we really want to merge it 🙏 |
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. It appears Michael's suggestions were addressed as well.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
* First draft migrate timelion to elastic-charts * Some refactoring. Added brush event. * Added title. Some refactoring * Fixed some type problems. Added logic for yaxes function * Fixed some types, added missing functionality for yaxes * Fixed some types, added missing functionality for stack property * Fixed unit test * Removed unneeded code * Some refactoring * Some refactoring * Fixed some remarks. * Fixed some styles * Added themes. Removed unneeded styles in BarSeries * removed unneeded code. * Fixed some comments * Fixed vertical cursor across Timelion visualizations of a dashboad * Fix some problems with styles * Use RxJS instead of jQuery * Remove unneeded code * Fixed some problems * Fixed unit test * Fix CI * Fix eslint * Fix some gaps * Fix legend columns * Some fixes * add 2 versions of Timeline app * fix CI * cleanup code * fix CI * fix legend position * fix some cases * fix some cases * remove extra casting * cleanup code * fix issue with static * fix header formatter * fix points * fix ts error * Fix yaxis behavior * Fix some case with yaxis * Add deprecation message and update asciidoc * Fix title * some text improvements Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
* First draft migrate timelion to elastic-charts * Some refactoring. Added brush event. * Added title. Some refactoring * Fixed some type problems. Added logic for yaxes function * Fixed some types, added missing functionality for yaxes * Fixed some types, added missing functionality for stack property * Fixed unit test * Removed unneeded code * Some refactoring * Some refactoring * Fixed some remarks. * Fixed some styles * Added themes. Removed unneeded styles in BarSeries * removed unneeded code. * Fixed some comments * Fixed vertical cursor across Timelion visualizations of a dashboad * Fix some problems with styles * Use RxJS instead of jQuery * Remove unneeded code * Fixed some problems * Fixed unit test * Fix CI * Fix eslint * Fix some gaps * Fix legend columns * Some fixes * add 2 versions of Timeline app * fix CI * cleanup code * fix CI * fix legend position * fix some cases * fix some cases * remove extra casting * cleanup code * fix issue with static * fix header formatter * fix points * fix ts error * Fix yaxis behavior * Fix some case with yaxis * Add deprecation message and update asciidoc * Fix title * some text improvements Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
* First draft migrate timelion to elastic-charts * Some refactoring. Added brush event. * Added title. Some refactoring * Fixed some type problems. Added logic for yaxes function * Fixed some types, added missing functionality for yaxes * Fixed some types, added missing functionality for stack property * Fixed unit test * Removed unneeded code * Some refactoring * Some refactoring * Fixed some remarks. * Fixed some styles * Added themes. Removed unneeded styles in BarSeries * removed unneeded code. * Fixed some comments * Fixed vertical cursor across Timelion visualizations of a dashboad * Fix some problems with styles * Use RxJS instead of jQuery * Remove unneeded code * Fixed some problems * Fixed unit test * Fix CI * Fix eslint * Fix some gaps * Fix legend columns * Some fixes * add 2 versions of Timeline app * fix CI * cleanup code * fix CI * fix legend position * fix some cases * fix some cases * remove extra casting * cleanup code * fix issue with static * fix header formatter * fix points * fix ts error * Fix yaxis behavior * Fix some case with yaxis * Add deprecation message and update asciidoc * Fix title * some text improvements Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Closes: #79984, #74888, #69122, #10810
Summary
Migrated timelion from jquery-flot to elastic-charts
Problems which I found described in the following issues: elastic/elastic-charts#878 and elastic/elastic-charts#893
Here points that we should do:
Below you can find some screenshots to compare timelion with jquery-flot and elastic-charts:
.es(index=metricbeat-*,
timefield='@timestamp',
metric='avg:system.cpu.user.pct')
timelion with jquery-flot (as now we have in master):
timelion with elastic-charts (this PR):
.es(offset=-1h, index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('last hour').lines(fill=1,width=0.5).color(gray), .es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current hour').title('CPU usage over time').color(#1E90FF)
timelion with jquery-flot (as now we have in master):
timelion with elastic-charts (this PR):
.es(index=metricbeat*, timefield=@timestamp, metric=max:system.network.in.bytes).derivative().divide(1048576), .es(index=metricbeat*, timefield=@timestamp, metric=max:system.network.out.bytes).derivative().multiply(-1).divide(1048576)
timelion with jquery-flot (as now we have in master):
timelion with elastic-charts (this PR):
Checklist
Delete any items that are not applicable to this PR.
For maintainers