-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixing Popover and XAxis ticks Tooltip bugs for Vertical bar chart and Line Chart #32760
base: usr/atisjai/chartsV9
Are you sure you want to change the base?
Conversation
marginTop: '13px', | ||
color: tokens.colorNeutralForeground2, | ||
borderLeft: 'var(--lineColor)', |
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.
what value does lineColor represent
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.
the value is provided in the popover class as 4px solid ${color}
,
packages/react-components/react-charts-preview/library/src/utilities/utilities.ts
Outdated
Show resolved
Hide resolved
…luentui into users/srmukher/VBCTooltip
…oft/fluentui into users/srmukher/VBCTooltip
xAxis: xAxisElement, | ||
}; | ||
xAxisElement && tooltipOfXAxislabels(tooltipProps); | ||
setXAxisElement(xAxisElement.node()); |
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.
instead of setting xAxisElement can you set the tooltipprops here directly.
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.
tooltip props now has only these 2 elements out of which tooltipRef is not a state variable, thus need not be set. const tooltipProps = {
xAxis: xAxis,
div: tooltipRef.current,
};
@@ -1,58 +0,0 @@ | |||
import { makeStyles, mergeClasses, shorthands } from '@griffel/react'; |
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.
dont remove this file
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.
but no styles are used from here. It will be empty then
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.
added as discussed
@@ -816,27 +827,10 @@ export const LineChart: React.FunctionComponent<ILineChartProps> = React.forward | |||
</g>, | |||
); | |||
} | |||
const classes = useLineChartStyles_unstable(props); | |||
// Removing un wanted tooltip div from DOM, when prop not provided. | |||
if (!props.showXAxisLablesTooltip) { |
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.
where is the code eq to this logic when showXAxisLabelsTooltip is 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.
we do not need that as we are setting the props only when showXAxisLablesTooltip is true. Earlier it was removing the div from dom for which this block was kept.
verticalbarchartClassNames.opacityChangeOnHover, | ||
baseStyles.opacityChangeOnHover /*props.styles?.opacityChangeOnHover*/, | ||
), | ||
opacityChangeOnHover: mergeClasses(verticalbarchartClassNames.opacityChangeOnHover), |
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.
why this change
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.
it was giving build error as opacityChangeOnHover is not present in baseStyles
packages/react-components/react-charts-preview/library/src/utilities/utilities.ts
Outdated
Show resolved
Hide resolved
c6c54f1
to
74f3445
Compare
Following bugs were fixed: