Skip to content

Commit 4bbbf8e

Browse files
committed
Add arrayminus data_array
1 parent a696f15 commit 4bbbf8e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/components/fields/derived.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export const FillDropdown = connectToContainer(UnconnectedDropdown, {
406406

407407
export const CustomErrorBars = connectToContainer(UnconnectedDataSelector, {
408408
modifyPlotProps: (props, context, plotProps) => {
409-
const errorBar = props.attr.replace('.array', '');
409+
const errorBar = props.attr.split('.')[0].trim();
410410
if (
411411
attributeIsData(plotProps.attrMeta) &&
412412
context.container &&

src/default_panels/GraphCreatePanel.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ const GraphCreatePanel = ({localize: _}) => {
7373
]}
7474
/>
7575
<CustomErrorBars label={_('Custom Error X')} attr="error_x.array" />
76+
<CustomErrorBars
77+
label={_('Custom Error X (-)')}
78+
attr="error_x.arrayminus"
79+
/>
7680
<Radio
7781
label={_('Error Y')}
7882
attr="error_y.visible"
@@ -82,6 +86,10 @@ const GraphCreatePanel = ({localize: _}) => {
8286
]}
8387
/>
8488
<CustomErrorBars label={_('Custom Error Y')} attr="error_y.array" />
89+
<CustomErrorBars
90+
label={_('Custom Error Y (-)')}
91+
attr="error_y.arrayminus"
92+
/>
8593
<Radio
8694
label={_('Error Z')}
8795
attr="error_z.visible"
@@ -91,6 +99,14 @@ const GraphCreatePanel = ({localize: _}) => {
9199
]}
92100
/>
93101
<CustomErrorBars label={_('Custom Error Z')} attr="error_z.array" />
102+
<CustomErrorBars
103+
label={_('Custom Error Z (-)')}
104+
attr="error_z.arrayminus"
105+
/>
106+
<CustomErrorBars
107+
label={_('Custom Error Z (-)')}
108+
attr="error_z.arrayminus"
109+
/>
94110
</Section>
95111

96112
<Section name={_('Options')}>

0 commit comments

Comments
 (0)