Skip to content

patches for creating cones and tubes from scratch #734

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

Merged
merged 1 commit into from
Sep 6, 2018
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/default_panels/GraphCreatePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ const GraphCreatePanel = (props, {localize: _, setPanel}) => {
<DataSelector label={_('U')} attr="u" />
<DataSelector label={_('V')} attr="v" />
<DataSelector label={_('W')} attr="w" />
<DataSelector label={_('X start')} attr="starts.x" />
<DataSelector label={_('Y start')} attr="starts.y" />
<DataSelector label={_('Z start')} attr="starts.z" />
<DataSelector label={_('Headers')} attr="header.values" />
<DataSelector label={_('Columns')} attr="cells.values" />

Expand Down
20 changes: 20 additions & 0 deletions src/default_panels/StyleTracesPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ const StyleTracesPanel = (props, {localize: _}) => (
options={[{label: _('Show'), value: true}, {label: _('Hide'), value: false}]}
/>
<NumericFraction label={_('Trace Opacity')} attr="opacity" />
<PlotlySection name={_('Cones & Streamtubes')}>
<Numeric label={_('Size')} attr="sizeref" />
<Dropdown
label={_('Size Mode')}
options={[{label: _('scaled'), value: 'scaled'}, {label: _('absolute'), value: 'absolute'}]}
attr="sizemode"
/>
<Dropdown
label={_('Cone Anchor')}
options={[
{label: _('Tip'), value: 'tip'},
{label: _('Tail'), value: 'tail'},
{label: _('Center'), value: 'center'},
{label: _('Center of Mass'), value: 'cm'},
]}
attr="anchor"
/>
<Numeric label={_('Max Tube segments')} attr="maxdisplayed" />
</PlotlySection>
<MultiColorPicker label={_('Color')} attr="color" />
<TraceTypeSection name={_('Pie Colors')} traceTypes={['pie']} mode="trace">
<LayoutSection attr="name">
Expand Down Expand Up @@ -222,6 +241,7 @@ const StyleTracesPanel = (props, {localize: _}) => (
<SymbolSelector label={_('Symbol')} attr="marker.symbol" />
<Numeric label={_('Border Width')} attr="marker.line.width" />
<MultiColorPicker label={_('Border Color')} attr="marker.line.color" />
<Numeric label={_('Max Number of Points')} attr="marker.maxdisplayed" />
</TraceMarkerSection>

<TraceTypeSection
Expand Down
5 changes: 5 additions & 0 deletions src/lib/customTraceType.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export function traceTypeToPlotlyInitFigure(traceType, gl = '') {
orientation: 'v',
type: 'bar',
};
case 'cone':
return {
sizeref: 1,
type: 'cone',
};
default:
return {type: traceType};
}
Expand Down