Early in my career at Apple, I learned a great deal about building products. I gained exposure to the world-class manufacturing processes that enabled Apple to ship its hardware products on time and at quality, and later transform itself into the most valuable company in the world.

My experience at Apple also taught me how the principles behind manufacturing optimization could be applied to software engineering and architecture design.

Software development continues to trend toward reusable and interoperable components rather than bespoke engineering for everything. Like optimizing processes in manufacturing, choosing the right frameworks and libraries is the key to fast, efficient development.

If you’re building an application with data visualizations, an early decision you have to make is whether to use D3 or a React chart library.

If you’re not familiar with D3, it is a Javascript library that provides the necessary building blocks to build data visualizations by manipulating SVG and HTML. It has become the backbone of the most popular reusable data visualization libraries — such as ChartJS, eCharts, C3, NVD3, and Plotly — which make it easier to generate D3-based charts while writing less code. Most of these libraries have a wrapper library for usage in popular frameworks, such as Ember, React, Vue, or Angular.

If you want to minimize writing custom code and time, I recommend using a React chart library instead of creating your own charts in D3.

But after you decide to use an existing library, the decision to invest time and energy into a new chart library can be overwhelming. Where do you start?

React is a relatively new ecosystem and there are perhaps fewer chart library options than there are for Javascript, which might make you feel a bit limited. As a starting point, I would suggest that you look at these React-specific libraries:

There are also some great wrappers out there, such as react-chartjs-2 and React Highcharts. But before you weigh the pros and cons of each library, I’ll outline below what I think are the most important criteria for your decision.

Top criteria for choosing a library

Your first step should be to clearly define your use cases. It sounds obvious, but knowing what you are looking for is the most important criteria in your decision.

What chart types does your application require? Depending on the type of application you’re building, you might require simple instead of complex charts. Often, line/area, grouped/stacked bar, and pie/donut charts suffice for most applications.

What kind of customization, formatting, and interactivity do you require in your design? Do you need to be able to customize tick marks? What about showing or hiding grids and axes? Will you need to custom tooltips, legends, and margins? Will you need to format and style your charts significantly? These are all important questions you should also ask.

After you have concretely defined your requirements, here are the top four questions you should consider:

  1. Is the project well-documented with examples?
  2. How active is the project?
  3. Is the project free or commercially-licensed?
  4. How easily customizable are chart components, like tooltips and legends?

#reactjs #javascript #web-development

Choosing a data visualization library for React
68.15 GEEK