Skip to content

Commit

Permalink
Update error graphs and add image export option
Browse files Browse the repository at this point in the history
Enhancements were made in the error graphs to include a dynamic range for years and an export option was introduced allowing users to save the graphs as an SVG file. The export configuration includes settings for filename, dimensions, and format. This new functionality enables better data analysis and flexibility in terms of usage and distribution of the generated graphs.

Signed-off-by: Jordan Dialpuri <[email protected]>
  • Loading branch information
Dialpuri committed Jan 19, 2024
1 parent b32d800 commit f11f827
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
9 changes: 9 additions & 0 deletions webapp/src/statistics/Graphs/ErrorsVsResolution.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ export default function ErrorsVsResolution(props: { database: string }) {
// bgcolor: '#FFFFFF',
},
}}
config = {{
toImageButtonOptions: {
format: 'svg',
filename: 'validationErrorsWithResolution',
height: 1000,
width: 1500,
scale: 1,

}}}
/>
)}
</>
Expand Down
11 changes: 11 additions & 0 deletions webapp/src/statistics/Graphs/ErrorsVsYear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default function ErrorsVsYear(props: { database: string }) {
const [relativeTrace, setRelativeTrace] = useState();

Check warning on line 8 in webapp/src/statistics/Graphs/ErrorsVsYear.tsx

View workflow job for this annotation

GitHub Actions / build

'relativeTrace' is assigned a value but never used. Allowed unused vars must match /^_/u

// const [depositedTrace, setDepositedTrace] = useState();
const d = new Date();

const [data, setData] = useState<Record<
string,
Expand Down Expand Up @@ -158,6 +159,7 @@ export default function ErrorsVsYear(props: { database: string }) {
linewidth: 2,
mirror: true,
tickmode: 'auto',
range: [1980,d.getFullYear()]
},

legend: {
Expand All @@ -166,6 +168,15 @@ export default function ErrorsVsYear(props: { database: string }) {
// bgcolor: '#FFFFFF',
},
}}
config = {{
toImageButtonOptions: {
format: 'svg',
filename: 'validationErrorsOverTime',
height: 1000,
width: 1500,
scale: 1,

}}}
/>
)}
</>
Expand Down
11 changes: 10 additions & 1 deletion webapp/src/statistics/Graphs/GlycansVsYear.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,17 @@ export default function GlycansVsYear() {
x: legendDown ? 0 : 1.15,
y: legendDown ? -0.6 : 0.5,
// bgcolor: '#FFFFFF',
},
}
}}
config = {{
toImageButtonOptions: {
format: 'svg',
filename: 'glycosylationOverTime',
height: 1000,
width: 1500,
scale: 1,

}}}
/>
)}
</>
Expand Down

0 comments on commit f11f827

Please sign in to comment.