VibeKoding / Ensiklopedia Β· Fondasi KuatEnsiklopedia Β· Fondasi Kuat / Principles of Data VisualizationPrinciples of Data Visualization
VK

Principles of Data VisualizationPrinciples of Data Visualization

πŸ“š Ensiklopedia Β· Fondasi KuatEnsiklopedia Β· Fondasi Kuat 🌏 Dual Bahasa (ID / EN) ⚑ VibeKoding Native

Ensiklopedia VibeKoding: Principles of Data Visualization.Ensiklopedia VibeKoding: Principles of Data Visualization.

πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

A good chart is worth a thousand rows of data. Data visualization transforms abstract numbers into intuitive visual representations, allowing people to understand the story behind the data in seconds. From Excel charts to Grafana monitoring dashboards, visualization is everywhere.A good chart is worth a thousand rows of data. Data visualization transforms abstract numbers into intuitive visual representations, allowing people to understand the story behind the data in seconds. From Excel charts to Grafana monitoring dashboards, visualization is everywhere.

What will you learn in this article?What will you learn in this article?

After completing this chapter, you will gain:After completing this chapter, you will gain:

ChapterContentKey Concepts
Chapter 1Chart Type SelectionComparison, trends, proportions, distributions, relationships
Chapter 2Visualization Design PrinciplesData-ink ratio, consistency, readability
Chapter 3Dashboard LayoutOverview, comparison, drill-down, real-time
Chapter 4Tool SelectionECharts, D3, Grafana, Metabase
Chapter 5Common PitfallsTruncated axes, 3D pie charts, color misuse

------

0. The Big Picture: Why Visualization Matters0. The Big Picture: Why Visualization Matters

The human brain processes visual information much faster than text. A line chart lets you quickly see that "sales dropped last month," while the same information presented in a table might require row-by-row comparison to reach the same conclusion.The human brain processes visual information much faster than text. A line chart lets you quickly see that "sales dropped last month," while the same information presented in a table might require row-by-row comparison to reach the same conclusion.

The core value of visualization:The core value of visualization:

πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

The goal of visualization is to convey information, not to show off. A plain but accurate bar chart is far more valuable than a flashy but hard-to-understand 3D chart.The goal of visualization is to convey information, not to show off. A plain but accurate bar chart is far more valuable than a flashy but hard-to-understand 3D chart.

------

1. Chart Type Selection: Tell the Right Story with the Right Chart1. Chart Type Selection: Tell the Right Story with the Right Chart

The first step in choosing a chart is not "what chart do I like," but "what information do I want to convey." Different data purposes correspond to different optimal chart types.The first step in choosing a chart is not "what chart do I like," but "what information do I want to convey." Different data purposes correspond to different optimal chart types.

Chart Selection Quick ReferenceChart Selection Quick Reference

Data PurposeRecommended ChartNot RecommendedReason
Compare magnitudesBar chart, Column chartPie chartThe human eye is more sensitive to length differences than angle differences
Show trendsLine chart, Area chartBar chartThe continuity of a line implies temporal continuity
Show proportionsPie chart (≀5 categories), Stacked bar chart3D pie chart3D perspective distorts area proportions
Show distributionsHistogram, Box plotLine chartDistributions require viewing frequency, not trends
Show relationshipsScatter plot, Bubble chartBar chartThe relationship between two continuous variables requires two-dimensional space
πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

- One variable β†’ Histogram (distribution) or number card (KPI) - Two variables β†’ Line chart (time vs. value) or scatter plot (value vs. value) - Multiple categories β†’ Bar chart (comparison) or pie chart (proportion, ≀5 categories) - Multiple dimensions β†’ Radar chart or parallel coordinates plot- One variable β†’ Histogram (distribution) or number card (KPI) - Two variables β†’ Line chart (time vs. value) or scatter plot (value vs. value) - Multiple categories β†’ Bar chart (comparison) or pie chart (proportion, ≀5 categories) - Multiple dimensions β†’ Radar chart or parallel coordinates plot

------

2. Visualization Design Principles: Visual Encoding Principles2. Visualization Design Principles: Visual Encoding Principles

Good visualization is not about being "pretty" but about being "understandable." Several classic principles proposed by Edward Tufte in The Visual Display of Quantitative Information remain important references for visualization design today.Good visualization is not about being "pretty" but about being "understandable." Several classic principles proposed by Edward Tufte in The Visual Display of Quantitative Information remain important references for visualization design today.

PrincipleDescriptionAnti-pattern
Data-ink ratioThe proportion of "ink" used to display data in a chart should be as high as possibleExcessive gridlines, decorative elements
Minimize non-data elementsRemove visual elements that convey no information3D effects, shadows, gradient backgrounds
Consistent scaleStart axes from zero with uniform tick marks; if truncating an axis, clearly indicate itY-axis starting at 95 without explanation
Sensible color useUse color to encode information, not for decorationRainbow colors for ordinal data
Clear labelingTitle, axis labels, legend, and units are all indispensableNo units, no time range

2.1 Data-Ink Ratio2.1 Data-Ink Ratio

> The proportion of "ink" used to express data in a chart relative to the total "ink" should be as high as possible.> The proportion of "ink" used to express data in a chart relative to the total "ink" should be as high as possible.

Simply put: remove everything that doesn't convey information.Simply put: remove everything that doesn't convey information.

Should RemoveShould Keep
3D effects, shadows, gradientsData points, axis labels
Excessive gridlinesKey reference lines (e.g., target values)
Decorative iconsLegends (when there are multiple series)
Flashy background colorsClear titles and units

2.2 Consistency Principle2.2 Consistency Principle

2.3 Readability Principle2.3 Readability Principle

πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

1. Same metric, same color: Revenue should always be blue across all charts, not sometimes blue and sometimes green 2. Sequential data uses gradients: Temperature from low to high uses a blue→red gradient, not discrete colors 3. Consider colorblind-friendliness: Approximately 8% of males have red-green color blindness; avoid relying solely on red and green to distinguish critical information1. Same metric, same color: Revenue should always be blue across all charts, not sometimes blue and sometimes green 2. Sequential data uses gradients: Temperature from low to high uses a blue→red gradient, not discrete colors 3. Consider colorblind-friendliness: Approximately 8% of males have red-green color blindness; avoid relying solely on red and green to distinguish critical information

------

3. Dashboard Layout: Different Scenarios, Different Patterns3. Dashboard Layout: Different Scenarios, Different Patterns

A dashboard is an organic combination of multiple charts. A good dashboard doesn't just pile charts togetherβ€”it selects an appropriate layout pattern based on the use case.A dashboard is an organic combination of multiple charts. A good dashboard doesn't just pile charts togetherβ€”it selects an appropriate layout pattern based on the use case.

Four Common Layout PatternsFour Common Layout Patterns

Layout PatternCore StructureUse CaseDesign Points
OverviewKPI cards + trend charts + detail tablesExecutive daily reports, operations dashboardsPlace core metrics at the top; key numbers visible at a glance
Comparison analysisSymmetric left-right layoutA/B testing, year-over-year analysisKeep comparison dimensions consistent, highlight differences
Drill-down analysisProgressive expansion from summary to detailSales analysis, user behavior analysisSupport click interactions, layer-by-layer exploration
Real-time monitoringLarge numbers + real-time curves + alert statusDouble Eleven big screens, server monitoringAuto-refresh, dark background, suitable for projection

5 Principles of Dashboard Design5 Principles of Dashboard Design

  1. First ask "who is looking": The CEO views strategic metrics, operations views process metrics, engineers view technical metricsFirst ask "who is looking": The CEO views strategic metrics, operations views process metrics, engineers view technical metrics
  2. 5-second rule: Users should understand the dashboard's core information within 5 seconds5-second rule: Users should understand the dashboard's core information within 5 seconds
  3. Information hierarchy: Place the most important content in the upper-left, secondary content belowInformation hierarchy: Place the most important content in the upper-left, secondary content below
  4. Minimize scrolling: Display core content on one screen; avoid making users scroll to see critical dataMinimize scrolling: Display core content on one screen; avoid making users scroll to see critical data
  5. Whitespace: Don't fill every inch of space; appropriate whitespace makes the visual experience more comfortableWhitespace: Don't fill every inch of space; appropriate whitespace makes the visual experience more comfortable
  6. πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

    - Dashboard: Real-time/near-real-time, interactive, oriented toward monitoring and quick decision-making - Report: Generated periodically (daily/weekly/monthly), static, oriented toward detailed analysis and archival These two are not replacements for each other but complements. Dashboards identify problems; reports analyze them in depth.- Dashboard: Real-time/near-real-time, interactive, oriented toward monitoring and quick decision-making - Report: Generated periodically (daily/weekly/monthly), static, oriented toward detailed analysis and archival These two are not replacements for each other but complements. Dashboards identify problems; reports analyze them in depth.

    ------

    4. Tool Selection: From Code Libraries to BI Platforms4. Tool Selection: From Code Libraries to BI Platforms

    Visualization tools can be divided into three tiers: code-level chart libraries, data analysis chart libraries, and BI platforms. Which one to choose depends on requirements complexity, interaction needs, and team technical capabilities.Visualization tools can be divided into three tiers: code-level chart libraries, data analysis chart libraries, and BI platforms. Which one to choose depends on requirements complexity, interaction needs, and team technical capabilities.

    4.1 Code-Level Chart Libraries4.1 Code-Level Chart Libraries

    ToolLanguage/PlatformFeaturesUse Case
    EChartsJavaScriptReady to use, rich chart types, excellent documentationEmbedded charts in business systems
    D3.jsJavaScriptLow-level flexibility, can customize any visualizationHighly customized data visualization
    Chart.jsJavaScriptLightweight and simple, quick to get startedSimple chart requirements
    MatplotlibPythonStandard scientific computing library, static chartsData analysis, paper figures
    PlotlyPython/JSInteractive charts, 3D supportData exploration, Jupyter Notebook

    4.2 BI Platforms (No-Code / Low-Code)4.2 BI Platforms (No-Code / Low-Code)

    ToolPositioningCore StrengthSuitable Team
    GrafanaMonitoring visualizationStrong time-series support, alerting integrationOps/SRE teams
    MetabaseLightweight BIOpen source and free, create charts from SQLSmall to mid teams building quickly
    Apache SupersetEnterprise BIOpen source, supports big data sourcesCompanies with data teams
    TableauCommercial BIDrag-and-drop, excellent visualizationBusiness analysts
    Power BICommercial BIStrong integration with Microsoft ecosystemEnterprises using the Microsoft stack
    πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

    - Developers embedding charts in products β†’ ECharts or Chart.js (for simple scenarios) - Data analysts doing exploratory analysis β†’ Plotly + Jupyter or Metabase - Ops monitoring dashboards β†’ Grafana (the de facto standard) - Business teams doing self-service analytics β†’ Metabase (open source) or Tableau (commercial) - Need high customization β†’ D3.js (steep learning curve, but most flexible)- Developers embedding charts in products β†’ ECharts or Chart.js (for simple scenarios) - Data analysts doing exploratory analysis β†’ Plotly + Jupyter or Metabase - Ops monitoring dashboards β†’ Grafana (the de facto standard) - Business teams doing self-service analytics β†’ Metabase (open source) or Tableau (commercial) - Need high customization β†’ D3.js (steep learning curve, but most flexible)

    ------

    5. Common Pitfalls: These Charts Are Lying to You5. Common Pitfalls: These Charts Are Lying to You

    Data visualization is a double-edged sword: used well, it reveals truth; used poorly, it creates illusions. Below are the most common visualization pitfalls that every data practitioner should be able to recognize.Data visualization is a double-edged sword: used well, it reveals truth; used poorly, it creates illusions. Below are the most common visualization pitfalls that every data practitioner should be able to recognize.

    5.1 Truncated Axes5.1 Truncated Axes

    Changing the Y-axis starting point from 0 to a large number makes tiny differences look like massive changes.Changing the Y-axis starting point from 0 to a large number makes tiny differences look like massive changes.

    ScenarioActual DifferenceVisual Perception
    Y-axis starts at 0Product A: 98 points, Product B: 95 pointsSmall gap
    Y-axis starts at 90Same dataA appears to be several times larger than B

    When is truncation acceptable? When absolute values are large but changes are small (e.g., stock price from 100 to 105), truncation is reasonable, but it must be clearly labeled.When is truncation acceptable? When absolute values are large but changes are small (e.g., stock price from 100 to 105), truncation is reasonable, but it must be clearly labeled.

    5.2 The 3D Pie Chart Perspective Trap5.2 The 3D Pie Chart Perspective Trap

    3D perspective makes sectors closer to the viewer appear larger. A 25% sector can look like 35% under a 3D viewing angle.3D perspective makes sectors closer to the viewer appear larger. A 25% sector can look like 35% under a 3D viewing angle.

    Solution: Never use 3D pie charts. Use regular pie charts or donut charts, or simply use bar charts.Solution: Never use 3D pie charts. Use regular pie charts or donut charts, or simply use bar charts.

    5.3 Color Misuse5.3 Color Misuse

    Wrong PracticeCorrect Practice
    Using red-green to represent dataUsing blue-orange and other colorblind-safe palettes
    Different colors for each categoryUsing shades of the same color family for the same series
    Encoding continuous data with color but no legendAlways provide a color legend and value labels
    Insufficient contrast between background and data colorsEnsure WCAG AA level contrast

    5.4 Other Common Mistakes5.4 Other Common Mistakes

    PitfallProblemFix
    Dual Y-axesTwo unrelated metrics sharing the X-axis implies causationSplit into two charts, or explicitly state no causal relationship
    Area misrepresentationUsing a circle's radius instead of area to represent valuesWhen values double, area should double, not radius
    Uneven time axisJanuary, March, and December spaced equallyArrange by actual time proportions
    Too many categoriesPie chart with 15 sectorsUse bar charts for more than 5 categories, or group into "Other"
    πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

    The purpose of visualization is to aid understanding, not to manipulate perception. Ask yourself every time you create a chart: - If I were the reader, would this chart lead me to a wrong conclusion? - Am I hiding unfavorable data? - Are the axes, scales, and colors presenting the data fairly?The purpose of visualization is to aid understanding, not to manipulate perception. Ask yourself every time you create a chart: - If I were the reader, would this chart lead me to a wrong conclusion? - Am I hiding unfavorable data? - Are the axes, scales, and colors presenting the data fairly?

    ------

    SummarySummary

    Data visualization is the "last mile" of delivering data value. No matter how good the analysis is, if it cannot be correctly understood, it's as if the analysis never happened.Data visualization is the "last mile" of delivering data value. No matter how good the analysis is, if it cannot be correctly understood, it's as if the analysis never happened.

    Let's review the key takeaways from this chapter:Let's review the key takeaways from this chapter:

    1. Choose the right chart: Select chart types based on data purpose (comparison, trends, proportions, distributions, relationships)Choose the right chart: Select chart types based on data purpose (comparison, trends, proportions, distributions, relationships)
    2. Design principles: High data-ink ratio, consistency, and readability are the three core principlesDesign principles: High data-ink ratio, consistency, and readability are the three core principles
    3. Dashboard layout: Overview, comparison, drill-down, and real-time patterns cover most scenariosDashboard layout: Overview, comparison, drill-down, and real-time patterns cover most scenarios
    4. Tool selection: From ECharts to Grafana, choose based on team capability and requirements complexityTool selection: From ECharts to Grafana, choose based on team capability and requirements complexity
    5. Avoid pitfalls: Truncated axes, 3D pie charts, and color misuse are the most common misleading techniquesAvoid pitfalls: Truncated axes, 3D pie charts, and color misuse are the most common misleading techniques
    6. Further ReadingFurther Reading

      • [The Visual Display of Quantitative Information](https://www.edwardtufte.com/tufte/books_vdqi) - Edward Tufte's visualization classic[The Visual Display of Quantitative Information](https://www.edwardtufte.com/tufte/books_vdqi) - Edward Tufte's visualization classic
      • [ECharts Official Documentation](https://echarts.apache.org/zh/index.html) - The most popular charting library[ECharts Official Documentation](https://echarts.apache.org/zh/index.html) - The most popular charting library
      • [D3.js](https://d3js.org/) - Powerful low-level visualization library[D3.js](https://d3js.org/) - Powerful low-level visualization library
      • [Grafana](https://grafana.com/) - The de facto standard for monitoring visualization[Grafana](https://grafana.com/) - The de facto standard for monitoring visualization
      • [From Data to Viz](https://www.data-to-viz.com/) - Chart type selection decision tree[From Data to Viz](https://www.data-to-viz.com/) - Chart type selection decision tree
      • [ColorBrewer](https://colorbrewer2.org/) - Colorblind-safe color scheme tool[ColorBrewer](https://colorbrewer2.org/) - Colorblind-safe color scheme tool