Urgent.News

What's breaking now, across thousands of outlets.

Tech

A shadcn sidebar for React apps: clear navigation on desktop and mobile

Liquid syntax error: 'raw' tag was never closed

Choosing the right chart type in a React dashboard is crucial to effectively communicate data insights to users. The decision should be based on the specific question the chart aims to answer, the structure of the data, and the actions needed following any insights gained. Start by defining a clear, specific question that the chart should address, such as "Did paid sign-ups rise this week compared with last week?"

Next, identify the metric, its unit, the dimension being grouped, the time zone, and the rule for handling missing values. The metric definition must be unambiguous, as different interpretations of the same metric can lead to misleading conclusions.

Once the question and data are clear, match the chart type to the nature of the data. Line charts are ideal for showing trends over time, provided intervals are consistent and the date range is clearly labeled. When depicting rolling averages, explicitly state this in the chart. Bar charts are suitable for comparing a small set of discrete groups, such as sign-ups by plan, and should have a zero baseline for accurate magnitude comparisons.

Stacked bar charts can display the composition of totals, but they may obscure smaller segments if not used carefully. Area charts emphasize volume changes over time but should be used when the filled area itself carries significance.

For multiple series, evaluate whether overlapping data points will hinder readability. Consider using sparklines for quick directional cues or ranked bar lists when names and values are more important than a detailed plot. For repeated categories or activities over time, heatmaps can reveal patterns, but ensure the color scale is understandable and meaningful.

Activity grids are effective for displaying repeated activity over calendar time, but they should not imply exact quantities unless the grid's cells and legend accurately represent this.

If a table format would better serve the purpose—especially when exact values, multiple attributes, or copyable rows are needed—consider using a table alongside the chart. The chart should provide context and highlight changes, while the table or a detailed view should explain those changes in detail. Ensure the chart title includes the measure and the period, and include units where necessary.

Maintain essential context near the chart, such as the latest value and comparisons, using tooltips and summaries that are accessible across different devices.

Color should aid in distinguishing series rather than being the sole method of encoding data. Axes should be clearly labeled with appropriate units, and scales should be consistent and not truncated in a way that misrepresents data. Legends should use meaningful names from the product, and the chart design should adapt to mobile screens without sacrificing readability. Finally, validate the chart design against various data scenarios to ensure it remains effective under real-world conditions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

From Design Canvas to React: Build a Shader Hero with InspoAI Shades

The designer wants a background that moves. The developer wants something that won’t eat the page’s performance budget. Both want the headline to stay readable.

  • InspoAI Shades bridges design and code by creating React components from visual effects.
  • Designers work with layers in the editor, adjusting colors and frame size before adding effects.

An Empty Screen Is Not Always a Failure

One visible complaint, six different causes - five of them outside the service being blamed. 👋 Hi, I'm Anton - a software engineer working mostly in PHP/Symfony and Go.

  • Empty screens not always due to rule-set-markup service
  • Six different causes identified, each with distinct owner
  • Targeted approach enables more effective resolution

The Root KSK Rollover Is Done. Did Your Resolver's Trust Anchor Change?

The root KSK rollover swapped the key at the top of the DNSSEC chain, and what matters now is whether each of your validating resolvers swapped with it.

  • Root KSK rollover completed on October 11, 2024
  • Resolvers must update trust anchors to KSK-2024
  • Failure to update causes SERVFAIL errors for DNS queries

Japan Earthquake API — Free JMA JSON with Magnitude, Intensity and Depth

Japan sits on four tectonic plates, so earthquake data matters — and the authoritative source is the Japan Meteorological Agency (JMA, 気象庁) , not USGS.

  • Japan Meteorological Agency offers free JSON earthquake data feed
  • Hypocentre coordinates stored in concatenated cod string
  • Intensity values may exceed 7, use explicit ordering

More from Monday 12 October →