跳到正文

第 13 课 · Visualization

Charts and Views in KNIME

Create bar charts, line plots, histograms, box plots, scatter plots, and table views in KNIME, pick the right chart, and check the data feeding each view.

A chart can reveal in a second what a table hides: a spike, a gap, or two groups mixed together. KNIME draws charts with view nodes. This lesson helps you choose a chart, prepare its data, and avoid misleading pictures.

View nodes

The KNIME Views extension offers nodes such as these:

Node Good for
Bar Chart Comparing categories
Line Plot Change over time or an ordered axis
Histogram Distribution of one number
Box Plot Spread and outliers across groups
Scatter Plot Relation between two numbers
Heatmap Values across two dimensions
Pie Chart A few parts of a whole
Table View Browsing rows

There are others, including density, parallel coordinates, scatter plot matrix, and stacked area views. There is also a generic ECharts view for people who want to write custom chart code.

Add a view node after your data step, choose which columns go on which axis, execute it, then open its view (F10 is the shortcut).

Choose by question

Start from the question

Compare Bar chart
Trend Line plot
Spread Histogram or box plot
Relation Scatter plot
1 / 2

Prepare the data first

A view node draws the table you give it. If you want revenue per region, aggregate with GroupBy first so each bar has one clear number. If you want a trend by month, make sure the months are real dates or sorted in time order. Text such as Apr, Feb, Jan sorts alphabetically, which breaks the line.

Views exclude missing, infinite, and not-a-number values in many cases, with the histogram behaving differently. If a chart shows fewer points than your table has rows, look for those values.

Python Stand-in: a text bar chart from grouped data

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Printing what was left out is a good habit in any report.

Distributions

Averages hide shape. Two stores can have the same mean order value while one has many small orders plus a few huge ones. A histogram shows the shape, and a box plot compares groups, showing the median, the middle half of values, and unusual points.

Python Stand-in: same mean, different shape

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Make charts honest

  • Start bar charts at zero. Bars encode size by length, and cutting the axis exaggerates differences.
  • Label axes and units. "Revenue (EUR)" is clearer than "amount".
  • Limit categories. Twenty slices in a pie chart cannot be read. Use a sorted bar chart.
  • Use color with purpose. Highlight what matters and keep it consistent between charts. KNIME has nodes that assign colors to values so several views agree.
  • Check accessibility. Do not rely on color alone to carry meaning.

Seeing two lines move together does not prove one causes the other. Describe what the chart shows, and avoid claiming causes without further evidence.

Saving and sharing views

A view on your screen helps you explore. To give it to others, you can export images or build reports with KNIME's reporting extension, or combine several views into a page, which is the topic of the next lesson. Whatever you share, check that the underlying table does not expose personal details, such as names in a tooltip or table view.

Check the data behind the picture

Before you polish a chart, check the table that feeds it. Add a table view or inspect the node monitor. Confirm that the number of categories is what you expect, that no category appears twice because of spelling differences, and that totals agree with your summary. A beautiful chart of wrong data is worse than an ugly one, because people trust it more.

Scales and outliers

One extreme value can flatten every other point. Do not delete it just to make the chart look better. First ask whether it is real. If it is, you might show a second chart without it, clearly labeled, or use a different scale and say so. If it is an error, fix it at the data step and document the rule.

Two lines with very different scales on the same chart can also mislead, since the viewer may compare heights that are not comparable. Often two small charts with the same time axis are clearer.

Writing the title

A good title states the question or the main point, with the period: "Revenue by region, January to November 2026" is better than "Chart 1". Add a short note about what is excluded, such as cancelled orders. Readers should be able to understand the chart without asking you.

Practice task

Using your grouped sales data, build a sorted bar chart, a monthly line plot, and a histogram of order amounts. For each, write one sentence that describes what it shows and one sentence about what it cannot tell you. This second sentence is the more valuable habit.

Choosing between a chart and a table

Not every result needs a picture. If a reader must look up exact values, a sorted table works better than a chart. If the point is a comparison, a trend, or an unusual value, a chart works better. Many good reports use both: a chart that makes the point, followed by a small table that lets the reader check the numbers. When you have only one or two values, write them as large text with a short comparison, such as the change from last month.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Which chart best shows monthly revenue over two years?

    A line plot shows change along an ordered time axis.
  2. 2. Why should bar charts usually start at zero?

    A truncated axis exaggerates differences between bars.
  3. 3. A chart shows fewer points than the table has rows. What should you check?

    Many views exclude such values.

Summary

  • Pick a view node that answers your question.
  • Aggregate and order data before plotting.
  • Use histograms and box plots to see distributions.
  • Keep charts honest with zero baselines, labels, and few categories.
  • Check that shared views do not reveal sensitive data.

Next: Interactive Dashboards and Data Apps

你的学习进度保存在此浏览器中,无需账号。