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

Fix report charts #2241

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Fix report charts #2241

merged 1 commit into from
Aug 30, 2024

Conversation

Fosol
Copy link
Collaborator

@Fosol Fosol commented Aug 30, 2024

Resolved issue Scott was having in PROD.

Added information message to direct user to regenerate the report/section to pull in content.

@Fosol Fosol added bug Something isn't working subscriber PR contains changes towards the subscriber application, labels Aug 30, 2024
@Fosol Fosol self-assigned this Aug 30, 2024
@@ -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.
Copy link
Collaborator Author

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(
Copy link
Collaborator Author

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}>
Copy link
Collaborator Author

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:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fix UI

@Fosol Fosol merged commit c2273e9 into bcgov:dev Aug 30, 2024
1 check passed
@Fosol Fosol deleted the charts branch August 30, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subscriber PR contains changes towards the subscriber application,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant