@grafana/ui
Version:
Grafana Components Library
203 lines (198 loc) • 7.17 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var i18n = require('@grafana/i18n');
var schema = require('@grafana/schema');
;
const getGraphFieldOptions = () => ({
drawStyle: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.draw-style.label-lines", "Lines"),
value: schema.GraphDrawStyle.Line
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.draw-style.label-bars", "Bars"),
value: schema.GraphDrawStyle.Bars
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.draw-style.label-points", "Points"),
value: schema.GraphDrawStyle.Points
}
],
lineInterpolation: [
{
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.line-interpolation.description-linear",
"Linear"
),
value: schema.LineInterpolation.Linear,
icon: "gf-interpolation-linear"
},
{
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.line-interpolation.description-smooth",
"Smooth"
),
value: schema.LineInterpolation.Smooth,
icon: "gf-interpolation-smooth"
},
{
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.line-interpolation.description-step-before",
"Step before"
),
value: schema.LineInterpolation.StepBefore,
icon: "gf-interpolation-step-before"
},
{
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.line-interpolation.description-step-after",
"Step after"
),
value: schema.LineInterpolation.StepAfter,
icon: "gf-interpolation-step-after"
}
],
barAlignment: [
{
description: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.bar-alignment.description-before", "Before"),
value: schema.BarAlignment.Before,
icon: "gf-bar-alignment-before"
},
{
description: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.bar-alignment.description-center", "Center"),
value: schema.BarAlignment.Center,
icon: "gf-bar-alignment-center"
},
{
description: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.bar-alignment.description-after", "After"),
value: schema.BarAlignment.After,
icon: "gf-bar-alignment-after"
}
],
showPoints: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.show-points.label-auto", "Auto"),
value: schema.VisibilityMode.Auto,
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.show-points.description-auto",
"Show points when the density is low"
)
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.show-points.label-always", "Always"),
value: schema.VisibilityMode.Always
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.show-points.label-never", "Never"),
value: schema.VisibilityMode.Never
}
],
axisPlacement: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.axis-placement.label-auto", "Auto"),
value: schema.AxisPlacement.Auto,
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.axis-placement.description-auto",
"First field on the left, everything else on the right"
)
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.axis-placement.label-left", "Left"),
value: schema.AxisPlacement.Left
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.axis-placement.label-right", "Right"),
value: schema.AxisPlacement.Right
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.axis-placement.label-hidden", "Hidden"),
value: schema.AxisPlacement.Hidden
}
],
fillGradient: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.label-none", "None"),
value: schema.GraphGradientMode.None
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.label-opacity", "Opacity"),
value: schema.GraphGradientMode.Opacity,
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.description-opacity",
"Enable fill opacity gradient"
)
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.label-hue", "Hue"),
value: schema.GraphGradientMode.Hue,
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.description-hue",
"Small color hue gradient"
)
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.label-scheme", "Scheme"),
value: schema.GraphGradientMode.Scheme,
description: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.fill-gradient.description-scheme",
"Use color scheme to define gradient"
)
}
],
stacking: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.stacking.label-off", "Off"),
value: schema.StackingMode.None
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.stacking.label-normal", "Normal"),
value: schema.StackingMode.Normal
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.stacking.label-100", "100%"),
value: schema.StackingMode.Percent
}
],
thresholdsDisplayModes: [
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-off", "Off"),
value: schema.GraphThresholdsStyleMode.Off
},
{
label: i18n.t("grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-lines", "As lines"),
value: schema.GraphThresholdsStyleMode.Line
},
{
label: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-dashed-lines",
"As lines (dashed)"
),
value: schema.GraphThresholdsStyleMode.Dashed
},
{
label: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-filled-regions",
"As filled regions"
),
value: schema.GraphThresholdsStyleMode.Area
},
{
label: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-filled-regions-and-lines",
"As filled regions and lines"
),
value: schema.GraphThresholdsStyleMode.LineAndArea
},
{
label: i18n.t(
"grafana-ui.u-plot.config.get-graph-field-options.thresholds-display-mode.label-filled-regions-and-dashed-lines",
"As filled regions and lines (dashed)"
),
value: schema.GraphThresholdsStyleMode.DashedAndArea
}
]
});
const graphFieldOptions = getGraphFieldOptions();
exports.getGraphFieldOptions = getGraphFieldOptions;
exports.graphFieldOptions = graphFieldOptions;
//# sourceMappingURL=config.cjs.map