-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(react-charting): declarative chart bug fixes #33567
base: master
Are you sure you want to change the base?
Conversation
📊 Bundle size report✅ No changes found |
Pull request demo site: URL |
change/@fluentui-react-charting-4aabb452-e7e3-47e3-9964-7a7c4814e759.json
Show resolved
Hide resolved
…b.com/microsoft/fluentui into usr/agupta/declarativeCharts/bugFixes
…b.com/microsoft/fluentui into usr/agupta/declarativeCharts/bugFixes
@@ -450,7 +450,7 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt | |||
}); | |||
stackedData.push(currentStack); | |||
}); | |||
this._isMultiStackChart = stackedData && stackedData.length > 1 ? true : false; | |||
this._isMultiStackChart = stackedData && stackedData.length >= 1 ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if stackedData length == 1, then is it multi-stacked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in what case will this value be 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it won't be zero. Then what should we do, either we can ommit this property altogether? Because without changing this, the chart will not grey out. And this is used only to set the opacity.
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Outdated
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Outdated
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Show resolved
Hide resolved
packages/charts/react-charting/src/components/DeclarativeChart/PlotlySchemaAdapter.ts
Outdated
Show resolved
Hide resolved
} | ||
const parsedYear = parsedDate.getFullYear(); | ||
const yearInString = /\b\d{4}\b/.test(value); | ||
if (!yearInString && (parsedYear === 2000 || parsedYear === 2001)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found that parsed year can have values other than 2000 and 2001 also. And in those cases, isDate() is also returning true:
Value : Year Returned by parsedYear(Value) : isDate(Value)
-1 to -12 : 2001 : true
-13 to -31 : no year : false
-32 to -49 : 2032 to 2049 : true
-50 to -99 : 1950 to 1999 : true
0 : 2000 : true
1 to 12 : 2001 : true
13 to 31 : no year : false
32 to 49 : 2032 - 2049 : true
50 to 99 : 1950 - 1999 : true
Are these expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is expected.
Previous Behavior
New Behavior
Following fixes are made:
Related Issue(s)