Skip to content
Merged
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
34 changes: 33 additions & 1 deletion src/components/fields/ErrorBars.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, {Component, Fragment} from 'react';
import {DataSelector, Radio, Numeric} from '../index';
import {DataSelector, Radio, Numeric, MultiColorPicker} from '../index';
import RadioBlocks from '../widgets/RadioBlocks';
import Field from './Field';
import {connectToContainer} from 'lib';
Expand Down Expand Up @@ -91,6 +91,36 @@ class ErrorBars extends Component {
const mode = this.getMode();
const showCustomDataControl = this.props.fullValue.type === 'data';

const styleAttrs = (
<Fragment>
<Radio
label={_('Copy Y Style')}
attr={`${this.props.attr}.copy_ystyle`}
options={[
{label: _('Yes'), value: true},
{label: _('No'), value: false},
]}
/>
<Radio
label={_('Copy Z Style')}
attr={`${this.props.attr}.copy_zstyle`}
options={[
{label: _('Yes'), value: true},
{label: _('No'), value: false},
]}
/>
<MultiColorPicker
label={_('Color')}
attr={`${this.props.attr}.color`}
/>
<Numeric label={_('Thickness')} attr={`${this.props.attr}.thickness`} />
<Numeric
label={_('Crossbar Width')}
attr={`${this.props.attr}.width`}
/>
</Fragment>
);

if (mode === 'symmetric') {
return (
<Fragment>
Expand All @@ -111,6 +141,7 @@ class ErrorBars extends Component {
attr={`${this.props.attr}.array`}
/>
) : null}
{styleAttrs}
</Fragment>
);
}
Expand Down Expand Up @@ -144,6 +175,7 @@ class ErrorBars extends Component {
/>
</Fragment>
) : null}
{styleAttrs}
</Fragment>
);
}
Expand Down