question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cartesian Grid Over Graph (Rendered last)

See original GitHub issue

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

The source order (for chart rendering) is hard-coded

What is the expected behavior?

A few options I can think of:

  1. Respect the source order based on the order of the children but might enforce users to remember order unless there are sane (current) defaults in place
  2. Have a flag that renders cartesian grid last. e.g. gridOnTop: false // default. However, this will mean only the grid itself is affected
  3. Have a prop with an array of components’ displayNames as strings so we can map over them within the chart rendering function.
  4. [Suggestions?] Any other way without losing functionality?

I have attempted [2] and have a ready pull request for your review. Feedback appreciated

Here is an example where the grid is rendered on top of the chart (based on the proposed changes in [2].

screen shot 2017-04-06 at 11 07 59 am

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
flyingalexcommented, Dec 7, 2017

@jetpack3331 I tried and you can make it like this:

<AreaChart>
// more codes are in here
<CartesianGrid />   // put this at the end of AreaChart element
</AreaChart>
1reaction
Eric24commented, Apr 26, 2017

+1 for option [1]

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recharts - Adjust the position of the yAxis cartesian grid
This small snippet is basically based on the second one. Note that, to solve the grid adjusting, I simply added an empty bar...
Read more >
Using Render Grid, Cartesian Grid, and Polar Grid | Inkscape ...
In this recipe we will see how we can render different kinds of grids using Render | Grid, Render | Cartesian Grid and...
Read more >
Cartesian Chart Customisation - AG Grid
The grid will select best-guess defaults based on the type of chart, the column chart data types, and the data being plotted. If...
Read more >
Cartesian Charts - Bar Chart : Support Portal
Series are overlayed on the chart. Stacked - Series values are added on the y-axis, so each consecutive series appears above the last....
Read more >
Cartesian Surface Graphs - Documentation - Altair
Example of a near field displayed on a Cartesian surface graph. ... Enable the major and minor grid lines for surface graphs as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found