From a6d299a48a2596b87ab7ecb2f9556e7a78c19189 Mon Sep 17 00:00:00 2001 From: Nicholas King Date: Wed, 26 May 2021 18:40:27 -0700 Subject: [PATCH 1/2] Increase button size, chart text, bar chart border --- .../components/PerspectiveScoresBarChart.tsx | 13 +++++++++-- .../PerspectiveScoresSpiderChart.tsx | 10 ++++----- frontend/components/TextGenerationControl.tsx | 19 +++++++++++----- frontend/components/TextGenerationResults.tsx | 22 +++++++++++-------- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/frontend/components/PerspectiveScoresBarChart.tsx b/frontend/components/PerspectiveScoresBarChart.tsx index b31350a..033c0ca 100644 --- a/frontend/components/PerspectiveScoresBarChart.tsx +++ b/frontend/components/PerspectiveScoresBarChart.tsx @@ -87,7 +87,7 @@ class PerspectiveScoresBarChart extends Component (scoreObj.label == this.state.selectedScore))[0]; - var selectedScoreMessage = `${selectedScoreObj.scoreName}: ${selectedScoreObj.value.toFixed(2)}`; + var selectedScoreMessage = `${selectedScoreObj.scoreName}: ${(selectedScoreObj.value*100).toFixed(2)}%`; g.append("g") .attr("transform", "translate(0," + h + ")") @@ -117,6 +117,15 @@ class PerspectiveScoresBarChart extends Component { if (index == 1 || index == 2) { - return {"x": -(label.length) * 5, "y": 0.0}; + return {"x": -(label.length) * 6, "y": 0.0}; } else if (index == 3) { - return {"x": -(label.length) * 5, "y": 6}; + return {"x": -(label.length) * 5, "y": 10}; } else if (index == 4) { return {"x": -(label.length) * 2, "y": 12}; } else if (index == 5) { @@ -113,7 +113,7 @@ class PerspectiveScoresSpiderChart extends Component
-

Text Generation Prompt

+

Text Generation Prompt

+
+ + + { this.sortGeneratedTextResults(option.key, this.state.sortDescending); }} /> - { this.setHighlightedScoreLabel(option.key); @@ -196,7 +200,7 @@ class TextGenerationResults extends React.Component {item.id} -
+