Skip to content

Commit

Permalink
changed order of radar chart, fixed tooltip bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Utke committed Nov 19, 2024
1 parent df7e3f7 commit 3cddfc9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/charts/CategoryProportions.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function CategoryProportion(props) {

return (
<GeneralChart
chart_id={"category_proportions"}
chart_id={"category_proportions" + election_name}
api_request={api_request}
// compute_graph_data={compute_graph_data}
update_graph_data={update_graph_data}
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/RulePropertyRadarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default function RulePropertyRadarChart(props) {
return (
<div className={styles.graph_info_text_container}>
<GeneralChart
chart_id={"rule_property_radar_chart"}
chart_id={"rule_property_radar_chart" + JSON.stringify(election_filters)}
initial_graph_data={initial_graph_data}
// compute_graph_data={compute_graph_data}
update_graph_data={update_graph_data}
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/SatisfactionHistogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function SatisfactionHistogram(props) {
return (
<div className={styles.graph_info_text_container}>
<GeneralChart
chart_id={"satisfaction_histogram"}
chart_id={"satisfaction_histogram" + JSON.stringify(election_filters)}
compute_graph_data={compute_graph_data}
update_graph_data={update_graph_data}
generate_corner_info={single_election ? null : generate_corner_info}
Expand Down
4 changes: 2 additions & 2 deletions src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export const default_rules_visible = {

export const radar_chart_single_election_property_short_names = {
approval: [
"prop_pos_sat",
"inverted_cost_gini",
"avg_card_sat",
"avg_relcard_sat",
"avg_cost_sat",
"avg_relcost_sat",
"inverted_cost_gini",
"prop_pos_sat",
],
ordinal: [
"avg_borda_sat",
Expand Down
19 changes: 10 additions & 9 deletions src/pages/compare_election_results/ElectionGraphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,16 @@ export default function ElectionGraphs(props) {
style={{
width: only_one_selected ? section.width : "100%",
height: section.height
}}>
{section.render(
election,
rules,
rule_visibility,
rule_properties,
election_filters[election_index],
only_one_selected
)}
}}
>
{section.render(
election,
rules,
rule_visibility,
rule_properties,
election_filters[election_index],
only_one_selected
)}
</div>
</div>
</Collapsable>
Expand Down

0 comments on commit 3cddfc9

Please sign in to comment.