-
Notifications
You must be signed in to change notification settings - Fork 17
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 report charts #2241
Fix report charts #2241
Conversation
@@ -45,7 +45,7 @@ export const ReportSectionMediaAnalytics = React.forwardRef< | |||
<Show visible={!values.template?.chartTemplates.length}> | |||
<p className="error"> | |||
This template does not currently support charts. Update the template and add the charts it | |||
supports. | |||
supports. Save your report first to apply the template. |
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.
Improve user experience with more information.
@@ -65,7 +65,11 @@ export const ReportSectionMediaAnalyticsChart = React.forwardRef< | |||
}, [section, chart, reportContent, showReportData, testData, values.sections]); | |||
|
|||
React.useEffect(() => { | |||
setReportContent(values.instances ? values.instances[0].content : []); | |||
setReportContent( |
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.
Fixed critical bug in charts.
@@ -141,7 +141,17 @@ export const ChartViewer: React.FC<IChartViewerProps> = ({ | |||
return ( | |||
<div> | |||
<div> | |||
<canvas ref={canvasRef} id={`my-chart-${uid}`} /> | |||
<Show visible={!data?.labels.length}> |
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.
Direct user on how to get chart to display report data.
@@ -60,6 +60,10 @@ export const ConfigureDataset: React.FC<IChartSectionProps> = ({ sectionIndex, c | |||
isSentiment && chart.sectionSettings.dataset === '' | |||
? ['green', 'gold', 'red'] | |||
: [], | |||
datasetBorderColors: |
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.
Fix UI
Resolved issue Scott was having in PROD.
Added information message to direct user to regenerate the report/section to pull in content.