|
@@ -48,6 +48,7 @@ type Props = ReactRouter.WithRouterProps &
|
|
organization: OrganizationSummary;
|
|
organization: OrganizationSummary;
|
|
queryExtra: Query;
|
|
queryExtra: Query;
|
|
currentFilter: SpanOperationBreakdownFilter;
|
|
currentFilter: SpanOperationBreakdownFilter;
|
|
|
|
+ withoutZerofill: boolean;
|
|
};
|
|
};
|
|
|
|
|
|
function generateYAxisValues() {
|
|
function generateYAxisValues() {
|
|
@@ -87,6 +88,7 @@ class DurationChart extends Component<Props> {
|
|
router,
|
|
router,
|
|
queryExtra,
|
|
queryExtra,
|
|
currentFilter,
|
|
currentFilter,
|
|
|
|
+ withoutZerofill,
|
|
} = this.props;
|
|
} = this.props;
|
|
|
|
|
|
const start = this.props.start ? getUtcToLocalDateObject(this.props.start) : null;
|
|
const start = this.props.start ? getUtcToLocalDateObject(this.props.start) : null;
|
|
@@ -105,29 +107,6 @@ class DurationChart extends Component<Props> {
|
|
period: statsPeriod,
|
|
period: statsPeriod,
|
|
};
|
|
};
|
|
|
|
|
|
- const chartOptions = {
|
|
|
|
- grid: {
|
|
|
|
- left: '10px',
|
|
|
|
- right: '10px',
|
|
|
|
- top: '40px',
|
|
|
|
- bottom: '0px',
|
|
|
|
- },
|
|
|
|
- seriesOptions: {
|
|
|
|
- showSymbol: false,
|
|
|
|
- },
|
|
|
|
- tooltip: {
|
|
|
|
- trigger: 'axis' as const,
|
|
|
|
- valueFormatter: tooltipFormatter,
|
|
|
|
- },
|
|
|
|
- yAxis: {
|
|
|
|
- axisLabel: {
|
|
|
|
- color: theme.chartLabel,
|
|
|
|
- // p50() coerces the axis to be time based
|
|
|
|
- formatter: (value: number) => axisLabelFormatter(value, 'p50()'),
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
const headerTitle =
|
|
const headerTitle =
|
|
currentFilter === SpanOperationBreakdownFilter.None
|
|
currentFilter === SpanOperationBreakdownFilter.None
|
|
? t('Duration Breakdown')
|
|
? t('Duration Breakdown')
|
|
@@ -169,8 +148,9 @@ class DurationChart extends Component<Props> {
|
|
includePrevious={false}
|
|
includePrevious={false}
|
|
yAxis={generateYAxisValues()}
|
|
yAxis={generateYAxisValues()}
|
|
partial
|
|
partial
|
|
|
|
+ withoutZerofill={withoutZerofill}
|
|
>
|
|
>
|
|
- {({results, errored, loading, reloading}) => {
|
|
|
|
|
|
+ {({results, errored, loading, reloading, timeframe}) => {
|
|
if (errored) {
|
|
if (errored) {
|
|
return (
|
|
return (
|
|
<ErrorPanel>
|
|
<ErrorPanel>
|
|
@@ -178,6 +158,36 @@ class DurationChart extends Component<Props> {
|
|
</ErrorPanel>
|
|
</ErrorPanel>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ const chartOptions = {
|
|
|
|
+ grid: {
|
|
|
|
+ left: '10px',
|
|
|
|
+ right: '10px',
|
|
|
|
+ top: '40px',
|
|
|
|
+ bottom: '0px',
|
|
|
|
+ },
|
|
|
|
+ seriesOptions: {
|
|
|
|
+ showSymbol: false,
|
|
|
|
+ },
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: 'axis' as const,
|
|
|
|
+ valueFormatter: tooltipFormatter,
|
|
|
|
+ },
|
|
|
|
+ xAxis: timeframe
|
|
|
|
+ ? {
|
|
|
|
+ min: timeframe.start,
|
|
|
|
+ max: timeframe.end,
|
|
|
|
+ }
|
|
|
|
+ : undefined,
|
|
|
|
+ yAxis: {
|
|
|
|
+ axisLabel: {
|
|
|
|
+ color: theme.chartLabel,
|
|
|
|
+ // p50() coerces the axis to be time based
|
|
|
|
+ formatter: (value: number) => axisLabelFormatter(value, 'p50()'),
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+
|
|
const colors =
|
|
const colors =
|
|
(results && theme.charts.getColorPalette(results.length - 2)) || [];
|
|
(results && theme.charts.getColorPalette(results.length - 2)) || [];
|
|
|
|
|