Skip to content

Internal change. #11703

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
20 changes: 10 additions & 10 deletions test/metricsviz/metricsviz.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ func (c *chart) series(ts *TimeSeries, isCumulative bool) ([]opts.LineData, erro
func (c *chart) Charter() (components.Charter, error) {
lineChart := charts.NewLine()
yAxis := opts.YAxis{
Scale: true,
Show: true,
Scale: opts.Bool(true),
Show: opts.Bool(true),
}
isCumulative, err := c.isCumulative()
if err != nil {
Expand All @@ -331,7 +331,7 @@ func (c *chart) Charter() (components.Charter, error) {
lineChart.AddSeries(
ts.String(),
seriesData,
charts.WithLabelOpts(opts.Label{Show: false}),
charts.WithLabelOpts(opts.Label{Show: opts.Bool(false)}),
)
}
chartTitle := c.Title
Expand All @@ -344,14 +344,14 @@ func (c *chart) Charter() (components.Charter, error) {
charts.WithTitleOpts(opts.Title{Title: chartTitle}),
charts.WithInitializationOpts(opts.Initialization{Theme: echartstypes.ThemeVintage}),
charts.WithXAxisOpts(opts.XAxis{
Show: true,
Show: opts.Bool(true),
Data: []string{"foo", "bar"},
SplitNumber: 24,
AxisLabel: &opts.AxisLabel{Show: true},
AxisLabel: &opts.AxisLabel{Show: opts.Bool(true)},
}),
charts.WithYAxisOpts(yAxis, 0),
charts.WithLegendOpts(opts.Legend{
Show: true,
Show: opts.Bool(true),
SelectedMode: "multiple",
Orient: "vertical",
Right: "5%",
Expand All @@ -360,13 +360,14 @@ func (c *chart) Charter() (components.Charter, error) {
charts.WithDataZoomOpts(opts.DataZoom{Type: "inside", XAxisIndex: 0}),
charts.WithDataZoomOpts(opts.DataZoom{Type: "slider", XAxisIndex: 0}),
charts.WithDataZoomOpts(opts.DataZoom{Type: "inside", YAxisIndex: []int{}}),
charts.WithTooltipOpts(opts.Tooltip{Show: true, Trigger: "axis"}),
charts.WithTooltipOpts(opts.Tooltip{Show: opts.Bool(true), Trigger: "axis"}),
charts.WithToolboxOpts(opts.Toolbox{
Show: true,
Show: opts.Bool(true),
Feature: &opts.ToolBoxFeature{
SaveAsImage: &opts.ToolBoxFeatureSaveAsImage{Name: "📸 PNG", Show: true, Type: "png"},
SaveAsImage: &opts.ToolBoxFeatureSaveAsImage{Name: "📸 PNG", Show: opts.Bool(true), Type: "png"},
},
}),
charts.WithInitializationOpts(opts.Initialization{Theme: echartstypes.ThemeVintage}),
)
lineChart.Validate()
return lineChart, nil
Expand Down Expand Up @@ -398,7 +399,6 @@ func (d *Data) ToHTML(opts HTMLOptions) (string, error) {
chartTitleRoot = fmt.Sprintf("%s [%s]", opts.Title, opts.ContainerName)
page.PageTitle = fmt.Sprintf("Metrics for %s (container %s) at %v", opts.Title, opts.ContainerName, opts.When.Format(time.DateTime))
}
page.Theme = echartstypes.ThemeVintage
page.SetLayout(components.PageFlexLayout)

// Find which groups contain which metrics that we're seeing in the data.
Expand Down