Skip to content

Is it possible to draw a solid black line around the grid? #4553

Closed Answered by Nicryc
Nicryc asked this question in Q&A
Discussion options

You must be logged in to vote

Ok my bad, I managed to do it in a better way than tricking with CSS. I just had to define a domain for my XAxis and YAxis (otherwise, they would not display).

<XAxis
    dataKey="date"
    allowDuplicatedCategory={false}
    type="category"
    tickLine={false}
    tickFormatter={dateFormatter}
    padding={{ left: 75, right: 75 }}
/>
<XAxis
    tick={false}
    height={1}
    xAxisId={1}
    orientation="top"
    domain={['auto', 'auto']} // that was the important line
/>
<YAxis
    dataKey="value"
    tick={false}
    domain={[upperDomain, lowerDomain]}
/>
<YAxis
    tick={false}
    domain={[upperDomain, lowerDomain]} // that was the important line
    yAxisId={1}
    orientation="right"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Nicryc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants