Skip to content
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

Adding fallback and fixes for test app crashes for 12 schema data #33624

Open
wants to merge 11 commits into
base: user/atisjai/stronglyTypePlotly
Choose a base branch
from

Conversation

srmukher
Copy link
Contributor

From PR https://github.com/microsoft/fluentui/pull/33542/files?diff=split&w=0

Fixes for test app crashes for 12 schema data

Fixed schema data numbers 84, 85, 88, 91, 92, 93, 99, 100, 101, 102, 103, 107

@srmukher srmukher force-pushed the users/srmukher/FixCrashesPlotly branch from 45d521e to bcb80ef Compare January 13, 2025 10:19
Copy link

Pull request demo site: URL

@AtishayMsft
Copy link
Contributor

AtishayMsft commented Jan 13, 2025

  const renderChart = (chartProps: ILineChartProps | IAreaChartProps) => {

renderChartJsx


Refers to: packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx:244 in af500c1. [](commit_id = af500c1, deletion_comment = False)

@srmukher
Copy link
Contributor Author

  const renderChart = (chartProps: ILineChartProps | IAreaChartProps) => {

renderChartJsx

Refers to: packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx:244 in af500c1. [](commit_id = af500c1, deletion_comment = False)

renamed

/>
);
};
return checkAndRenderChart(renderLineChartJsx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkAndRenderChart

can you pull latest changes and resolve the conflicts

fallbackVSBC = true;
return (
<VerticalStackedBarChart
{...transformPlotlyJsonToVSBCProps(plotlySchema, colorMap, isDarkTheme, fallbackVSBC)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallbackVSBC

fallbackVSBC is not use anywhere else. This need not be a shared variable

onChange: onActiveLegendsChange,
canSelectMultipleLegends: true,
selectedLegends: activeLegends,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legendProps={multiSelectLegendProps}

@@ -212,7 +214,7 @@ export const transformPlotlyJsonToVSBCProps = (
}
const legend: string = getLegend(series, index1);
const yVal: number = (series.y?.[index2] as number) ?? 0;
if (series.type === 'bar' || series.type === 'scatter') {
if (series.type === 'bar' || series.type === 'scatter' || fallbackVSBC) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallbackVSBC

use !!fallbackVSBC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants