I am trying to do what is explained at Dc.js: Scrollable rowChart with no gap?.
However, in my case, I am using React. Specifically, I am doing the charts based on This: https://github.com/LightTag/dcjs-in-react
For one of the rowCharts that has too many rows, I added:
<ChartTemplate chartFunction={axisChartFunc} title={props.title}
dim={props.dim} metric={props.metric} type={props.type}
showMetricsSelector={props.showMetricsSelector} reset={false}/>
So, instead of having
export const Grades = props => (
<ChartTemplate chartFunction={barChartFunc} title={props.title}
dim={props.dim} metric={props.metric} type={props.type}
showMetricsSelector={props.showMetricsSelector} reset={false}/>
)
I have:
export const Grades = props => (
<>
<ChartTemplate chartFunction={barChartFunc} title={props.title}
dim={props.dim} metric={props.metric} type={props.type}
showMetricsSelector={props.showMetricsSelector} reset={false}/>
<ChartTemplate chartFunction={axisChartFunc} />
</>
)
I added axis.js to the project, but I don't know how to import it correctly. I tried:
import * as axisChart from "../utils/axis.js";
But I get this error
./src/utils/axis.js
Line 23: 'dc' is not defined no-undef
Line 27: 'dc' is not defined no-undef
Line 27: 'dc' is not defined no-undef
Line 27: 'dc' is not defined no-undef
Line 35: 'd3' is not defined no-undef
Line 45: 'd3' is not defined no-undef
Line 52: 'd3' is not defined no-undef
Line 67: 'dc' is not defined no-undef
Line 101: 'd3' is not defined no-undef
Any suggestions?