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

update(opt): add min/maxInterval opt #412

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions opts/y_axis.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ type YAxis struct {
// It will be automatically computed to make sure axis tick is equally distributed when not set.
Max interface{} `json:"max,omitempty"`

// Minimum gap between split lines.
//
// For example, it can be set to be 1 to make sure axis label is show as integer.
// {
// minInterval: 1
// }
// It is available only for axis of type 'value' or 'time'.
MinInterval float64 `json:"minInterval,omitempty"`

// Maximum gap between split lines.
// For example, in time axis (type is 'time'), it can be set to be 3600 * 24 * 1000 to make sure that the gap between axis labels is less than or equal to one day.
//{
// maxInterval: 3600 * 1000 * 24
//}
// It is available only for axis of type 'value' or 'time'.
MaxInterval float64 `json:"maxInterval,omitempty"`

// The index of grid which the Y axis belongs to. Defaults to be in the first grid.
// default 0
GridIndex int `json:"gridIndex,omitempty"`
Expand Down