Skip to content
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

fix(tooltip): ie11 flex sizing #334

Merged
merged 3 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .playground/playgroud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class Playground extends React.Component {
this.onCursorUpdate,
true,
)}
{renderChart('2', this.ref3, KIBANA_METRICS.metrics.kibana_os_load[1].data.slice(15, 30), this.onCursorUpdate)}
{renderChart('3', this.ref3, KIBANA_METRICS.metrics.kibana_os_load[1].data.slice(15, 30), this.onCursorUpdate)}
</>
);
}
Expand All @@ -59,7 +59,13 @@ function renderChart(
return (
<div key={key} className="chart">
<Chart ref={ref}>
<Settings tooltip={{ type: 'vertical' }} debug={false} showLegend={true} onCursorUpdate={onCursorUpdate} />
<Settings
tooltip={{ type: 'vertical' }}
debug={false}
legendPosition={Position.Right}
showLegend={true}
onCursorUpdate={onCursorUpdate}
/>
<Axis
id={getAxisId('timestamp')}
title="timestamp"
Expand All @@ -68,7 +74,7 @@ function renderChart(
/>
<Axis id={getAxisId('count')} title="count" position={Position.Left} tickFormat={(d) => d.toFixed(2)} />
<LineSeries
id={getSpecId('dataset A with long title')}
id={getSpecId('dataset A with a really really really really long title')}
xScaleType={timeSeries ? ScaleType.Time : ScaleType.Linear}
yScaleType={ScaleType.Linear}
data={data}
Expand All @@ -90,6 +96,15 @@ function renderChart(
yAccessors={[1]}
stackAccessors={[0]}
/>
<LineSeries
id={getSpecId('dataset C')}
xScaleType={ScaleType.Time}
yScaleType={ScaleType.Linear}
data={KIBANA_METRICS.metrics.kibana_os_load[1].data.slice(0, 15)}
xAccessor={0}
yAccessors={[1]}
stackAccessors={[0]}
/>
</Chart>
</div>
);
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"semantic-release": "semantic-release",
"typecheck:src": "yarn build:ts --noEmit",
"typecheck:all": "tsc -p ./tsconfig.json --noEmit",
"playground": "cd .playground && webpack-dev-server"
"playground": "cd .playground && webpack-dev-server",
"playground:ie": "cd .playground && webpack-dev-server --host=0.0.0.0 --disable-host-check --useLocalIp"
},
"files": [
"dist/**/*",
Expand Down Expand Up @@ -144,6 +145,7 @@
"yarn": "^1.10.1"
},
"browserslist": [
"last 2 versions"
"last 2 versions",
"ie 11"
]
}
2 changes: 1 addition & 1 deletion src/components/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
&__label {
@include euiTextOverflowWrap;
min-width: 1px;
flex: 1;
flex: 1 1 auto;
}

&__value {
Expand Down
3 changes: 2 additions & 1 deletion src/components/legend/_legend_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
@include euiFontSizeXS;
@include euiTextTruncate;
margin-right: $euiSizeXS;
flex: 1;
flex: 1 1 auto;

&:hover {
cursor: pointer;
}
Expand Down