mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
Console graph color scheme support (#2900)
Add a colorScheme parameter to PromConsole.Graph, to allow using custom colors in console graphs.
This commit is contained in:
parent
43075d0215
commit
38de290d5f
File diff suppressed because one or more lines are too long
@ -311,6 +311,9 @@ PromConsole.graphDefaults = {
|
||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||
// Number formatter for y values hover detail.
|
||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeExact,
|
||||
// Color scheme to be used by the plots. Can be either a list of hex color
|
||||
// codes or one of the color scheme names supported by Rickshaw.
|
||||
colorScheme: null,
|
||||
};
|
||||
|
||||
PromConsole.Graph = function(params) {
|
||||
@ -420,7 +423,7 @@ PromConsole.Graph.prototype._escapeHTML = function(string) {
|
||||
|
||||
PromConsole.Graph.prototype._render = function(data) {
|
||||
var self = this;
|
||||
var palette = new Rickshaw.Color.Palette();
|
||||
var palette = new Rickshaw.Color.Palette({scheme: this.params.colorScheme});
|
||||
var series = [];
|
||||
|
||||
// This will be used on resize.
|
||||
|
Loading…
Reference in New Issue
Block a user