-
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 charts #2228
Fix charts #2228
Conversation
Publish tno-core:0.1.141
@@ -65,10 +65,12 @@ export const ReportSectionMediaAnalyticsChart = React.forwardRef< | |||
return ( | |||
<Col key={chart.id} className="chart"> | |||
<Row className="chart-header"> | |||
<Col flex="1"> | |||
<Col flex="1" onClick={() => setShowConfig((show) => !show)}> |
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.
Show/Hide chart by clicking on header.
@@ -99,15 +105,15 @@ export const ChartPicker: React.FC<IChartSectionProps> = ({ sectionIndex, chartI | |||
|
|||
<Col className="frm-in"> | |||
<label>Axis</label> | |||
<FormikCheckbox | |||
<Checkbox |
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 issue with isHorizontal
because it's the opposite of the checkbox label.
|
||
const canvasRef = React.useRef<HTMLCanvasElement>(null); | ||
|
||
const section = values.sections[sectionIndex]; | ||
const chart = section.chartTemplates[chartIndex]; | ||
const uid = `${section.id}_${sectionIndex}`; | ||
|
||
React.useEffect(() => { |
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.
Auto resize the chart based on axis values. However, this only works if the user opens the chart section.
if (a > b) return 1; | ||
return 0; | ||
}); | ||
options.groups?.map((g) => ({ key: g, label: `${g}` })) ?? |
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 sorting and alignment of values to labels.
"series" => content.GroupBy(c => c.SeriesId?.ToString() ?? "NA").OrderBy(group => group.Key).Where((g) => !excludeEmptyValues || g.Key != "NA"), | ||
"sentiment" => content.GroupBy(c => GetSentimentValue(c)?.ToString() ?? "null").Where((v) => !excludeEmptyValues || v.Key != "null").OrderByDescending(group => group.Key), | ||
"sentimentSimple" => content.GroupBy(c => GetSentimentRating(c) ?? "null").Where((v) => !excludeEmptyValues || v.Key != "null").OrderBy(group => group.Key), | ||
"series" => content.GroupBy(c => c.Series?.Name ?? c.OtherSeries ?? "None").Where((g) => !excludeEmptyValues || g.Key != "None").OrderBy(group => group.Key), |
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 series labels
Fixing chart configuration options and display.
Added ability to auto resize the chart. This does not work for auto reports yet.
Summary
Subscriber Report Charts