Commit 19b5d91b by Alexander Zobnin Committed by Torkel Ödegaard

Series color picker fix (#9442)

* colorpicker: fix spectrum color update on series color picker

* colorpicker: minor refactor
parent 9b34346f
......@@ -88,7 +88,7 @@ export class ColorPickerPopover extends React.Component<IProps, any> {
);
const spectrumTab = (
<div id="spectrum">
<GfSpectrumPicker color={this.props.color} onColorSelect={this.spectrumColorSelected.bind(this)} options={{}} />
<GfSpectrumPicker color={this.state.color} onColorSelect={this.spectrumColorSelected.bind(this)} options={{}} />
</div>
);
const currentTab = this.state.tab === 'palette' ? paletteTab : spectrumTab;
......
......@@ -44,7 +44,7 @@ export class SeriesColorPicker extends React.Component<IProps, any> {
return (
<div className="graph-legend-popover">
{this.props.series && this.renderAxisSelection()}
<ColorPickerPopover color="#7EB26D" onColorSelect={this.onColorChange} />
<ColorPickerPopover color={this.props.series.color} onColorSelect={this.onColorChange} />
</div>
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment