Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to FCs/Hooks #13

Open
5 of 26 tasks
amcdnl opened this issue Oct 26, 2020 · 5 comments
Open
5 of 26 tasks

Convert to FCs/Hooks #13

amcdnl opened this issue Oct 26, 2020 · 5 comments
Labels
good first issue Good for newcomers

Comments

@amcdnl
Copy link
Member

amcdnl commented Oct 26, 2020

Requirement

  • Convert components to FCs
  • Convert utils to hooks

Tasks

FCs

  • Bar Chart
  • Area Chart
  • Heatmap
  • Hive Plot
  • Sankey
  • Line Chart
  • Linear Gauge
  • Pie Chart
  • Radial Area
  • Radial Line
  • Radial Bar Chart
  • Radial Scatter Plot
  • Scatter Plot
  • Sparklines
  • Axis
  • Gridlines
  • Brush
  • Legends
  • Tooltip
  • Masks

Hooks

  • Zoom
  • Pan
  • Move
  • ZoomPan
  • ChartZoomPan
  • ChartContainer

Known Issues

Parent Reading Child Props

Parent components who rely on nested properties for processing ( such as gridline direction ) will not work correctly in the current implementation. Example:

  renderSeries(
    yAxisGrid,
    xAxisGrid,
    element: GridElement,
    type: 'line' | 'stripe'
  ) {
    const { xScale, yScale } = this.props;

    return (
      <Fragment>
        {this.shouldRenderY(element.props.direction) &&
          this.renderGroup(element, yAxisGrid, yScale, 'y', type)}
        {this.shouldRenderX(element.props.direction) &&
          this.renderGroup(element, xAxisGrid, xScale, 'x', type)}
      </Fragment>
    );
  }

In this scenario, element.props.direction will be undefined since its not longer a component class.

This can be fixed by setting those defaults on the parent though. See this commit for more info: e156d00

Pan Zoom

I'm considering using the gestures library I used in reaflow for the pan / zoom operations.

@amcdnl amcdnl added the good first issue Good for newcomers label Oct 26, 2020
pfried added a commit to Nantis-GmbH/reaviz that referenced this issue Nov 18, 2020
@amcdnl amcdnl mentioned this issue Dec 13, 2020
5 tasks
@ynahmany
Copy link
Contributor

@amcdnl you can update: areachart, heatmap and hiveplot are done.

@amcdnl
Copy link
Member Author

amcdnl commented Jan 28, 2021

Done 🎉

@KukR1
Copy link

KukR1 commented Apr 14, 2023

@amcdnl are the tasks up to date? because I want to help on here..

@amcdnl
Copy link
Member Author

amcdnl commented Apr 15, 2023

@KukR1 - Thats awesome; any contribution would be welcome! Sadly No they aren't - but just look for anything called Component or PureComponent in the source code and give it a shot.

@csdiehl
Copy link
Contributor

csdiehl commented Sep 7, 2023

@amcdnl I'm a data visualization developer who does a lot of work with React and D3, and am interested in contributing to this project. I can tackle some of these component conversions if there are still more to do - should I work on the functional_components branch or take out a new branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants