Fix types in QuestionGroupChart component
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -12,6 +12,12 @@ dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
|
||||
@@ -35,7 +35,7 @@ function App() {
|
||||
|
||||
// Create scales
|
||||
const xScale = d3
|
||||
.scaleBand()
|
||||
.scaleBand<number>()
|
||||
.domain(sortedResponses)
|
||||
.range([0, sortedResponses.length * config.groupSpacing]);
|
||||
return (
|
||||
|
||||
@@ -10,9 +10,9 @@ import "./Chart.css";
|
||||
interface QuestionGroupChartProps {
|
||||
question: string;
|
||||
metadata?: CategoryMetadata;
|
||||
groupData: { response: string }[];
|
||||
responses: string[];
|
||||
xScale: d3.ScaleBand<string>;
|
||||
groupData: { response: number }[];
|
||||
responses: number[];
|
||||
xScale: d3.ScaleBand<number>;
|
||||
}
|
||||
|
||||
function makeDot(
|
||||
|
||||
Reference in New Issue
Block a user