Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Line chart data points are partly hidden under axis #49

Open
pihlajus opened this issue Sep 1, 2016 · 4 comments
Open

Line chart data points are partly hidden under axis #49

pihlajus opened this issue Sep 1, 2016 · 4 comments

Comments

@pihlajus
Copy link

pihlajus commented Sep 1, 2016

I have created line chart but for some reason data points close to axis are partly hidden under the axis (see screenshot). Could this be prevented e.g. using css or some property?

partly hidden data point

@topicus
Copy link
Contributor

topicus commented Sep 3, 2016

@pihlajus you can try with clipEdge:

<NVD3Chart type="lineChart" clipEdge={true} />

Let me know if this helps you.

@pihlajus
Copy link
Author

pihlajus commented Sep 5, 2016

Thanks, but unfortunately this didn't bring any help.

@topicus
Copy link
Contributor

topicus commented Sep 5, 2016

@pihlajus Could you pass me an example of your code?

@pihlajus
Copy link
Author

pihlajus commented Sep 6, 2016

Sure @topicus, this is the rendering part:

    <NVD3Chart
        xAxis={{
          tickFormat: function(d){
           return timeFormat('%Y-%m-%d')(new Date(d))
        }}}
        yAxis={{
           tickFormat: function(d){
           return parseInt(d)
        }}}
        width={640}
        height={350}
        type="lineChart"
        margin={{
           left:60,
           right:80
        }}
        duration={1}
        showControls={false}
        showLegend={false}
        forceY={0}
        clipEdge={true}
        datum={chartData}
        x={function(d){return d[0];}}
        y={function(d){return d[1];}}
     />

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants