Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-4 # increment to reset cache
key: poetry-5 # increment to reset cache

- name: Install Poetry 📜
if: steps.poetry.outputs.cache-hit != 'true'
Expand All @@ -96,7 +96,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-7 # increment to reset cache
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-8 # increment to reset cache

- name: Create Poetry environments 📜
if: steps.poetry-venvs.outputs.cache-hit != 'true'
Expand Down
7 changes: 3 additions & 4 deletions apps/storybook/src/DataCurve.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const meta = {
args: {
abscissas: range(oneD.size),
ordinates: oneD.data,
errors: oneD.data.map(() => 10),
curveType: CurveType.LineOnly,
color: 'blue',
materialProps: {},
Expand All @@ -53,13 +52,13 @@ type Story = StoryObj<typeof meta>;

export const Default = {
render: (args) => {
const { abscissas, ordinates, errors, showErrors, ignoreValue } = args;
const { abscissas, ordinates, errors, ignoreValue } = args;

const abscissaDomain = useDomain(abscissas);
const ordinateDomain = useDomain(
ordinates,
ScaleType.Linear,
showErrors ? errors : undefined,
errors,
ignoreValue,
);

Expand Down Expand Up @@ -117,7 +116,7 @@ export const Glyphs = {
export const WithErrors = {
...Default,
args: {
showErrors: true,
errors: oneD.data.map(() => 10),
},
} satisfies Story;

Expand Down
17 changes: 5 additions & 12 deletions packages/app/src/vis-packs/core/line/LineToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,14 @@ interface Props {
dataDomain: Domain;
isSlice?: boolean;
isComplex?: boolean;
disableErrors?: boolean;
withErrors?: boolean;
config: LineConfig;
exportEntries?: ExportEntry[];
}

function LineToolbar(props: Props) {
const {
dataDomain,
isSlice,
isComplex,
disableErrors,
config,
exportEntries,
} = props;
const { dataDomain, isSlice, isComplex, withErrors, config, exportEntries } =
props;

const {
customDomain,
Expand Down Expand Up @@ -97,13 +91,12 @@ function LineToolbar(props: Props) {

<Separator />

{!isComplex && (
{withErrors && (
<ToggleBtn
label="Errors"
Icon={ErrorsIcon}
value={!disableErrors && showErrors}
value={showErrors}
onToggle={toggleErrors}
disabled={disableErrors}
/>
)}

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/line/MappedLineVis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function MappedLineVis(props: Props) {
<LineToolbar
dataDomain={combinedDomain}
isSlice={selection !== undefined}
disableErrors={!errors}
withErrors={!!errors}
config={config}
exportEntries={exportEntries}
/>,
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/vis/line/DataCurve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function DataCurve(props: Props) {
abscissas,
ordinates,
errors,
showErrors,
showErrors = true,
color,
width,
interpolation,
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/vis/line/LineVis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function LineVis(props: Props) {
title,
dtype,
errorsArray,
showErrors = false,
showErrors = true,
auxiliaries = [],
renderTooltip,
children,
Expand Down