On this page we will be looking at some charting and graph options of KNIME, particularly using the Generic ECharts View node.
Of course, we also have the 'standard' KNIME charting nodes (Bar Chart, Line Plot, Pie Chart, ...) which may probably be the easiest to chart your data, but sometimes you need more control.
We will start with a very simple example, a bar chart showing 'static' data configured in the node:
Now, we will see a similar chart, but this time with 'live' data , being the 8 maximum temperature values recorded in the USA in 2026 so far:
note how we configure the X-axis from the DATE column:
xAxis: {
type: "category",
data: await inputTable.getColumn("DATE"),
and how we configure 2 sets of bars (for maximum and minimum temperature):
series: [
{
type: "bar",
data: await inputTable.getColumn("TMAX"),
name: "TMAX",
emphasis: {
focus: "series",
},
},
{
type: "bar",
data: await inputTable.getColumn("TMIN"),
name: "TMIN",
emphasis: {
focus: "series",
},
}
],
Below you can see the configuration of the ECharts node and the resulting graph:
As a side note: notice that in the Configuration dialog of the ECharts node, we have the 'Ask K-AI' option.
Just as an experiment, I asked K-AI to 'Convert this bar chart into a line chart'. Below you can see the result. Quite impressive, no? (actually the only change in the code is that type: "bar" was replaced by type: "line" in the "series" block, which also does credit to the Apache ECharts library.
Below is the result. Actually this kind of graph looks better as a Bar chart.
Or, we can combine bars and lines in one graph :
The 'best' type of graph actually depends on the type of data you want to show. To show trends over time (for example maximum temperatures to show global warning) line charts are a good choice.
To show 'part of a whole' pie charts can be a good choice. We will illustrate this in the next example showing carbon gas emissions by Continent. As you can see very clearly, Asia is the main sources of Carbon emissions.
One further type of graph I want to show you is the Animated Bar Chart. What it does is show the evolution of a Metric over time. In this example it shows the maximum temperatures recorded in Italy, Spain and Portugal since 1960,
If you click on this Screen recording link, you can see it in action. (Sorry the video needs some editing...)