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

Allow setting minimum/maximum values for gauge #419

Closed
wants to merge 2 commits into from

Conversation

kgf1980
Copy link
Contributor

@kgf1980 kgf1980 commented Apr 30, 2024

Description

This PR adds the ability to set the minimum and maximum values for Gauge charts.

gauge := charts.NewGauge()
gauge.SetGlobalOptions(
    charts.WithTitleOpts(opts.Title{Title: "Basic Gauge example"}),
)
gauge.AddSeries("Solar Panels", []opts.GaugeData{{Name: "PV Generation", Value: rand.Intn(3500)}}).
    SetSeriesOptions(
        charts.WithGaugeOpts(opts.Gauge{MinValue: 0, MaxValue: 3500}),
)

Type of change

  • Bug fix (Non-breaking change which fixes an issue)
  • New feature (Non-breaking change which adds functionality)
  • Breaking change (Would cause existing functionality to not work as expected)
  • Docs
  • Others

@Koooooo-7
Copy link
Member

Hi @kgf1980 thx for you contribution!
closed via #422

@Koooooo-7 Koooooo-7 closed this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants