↓ Skip to main content
A mosaic of nine square frames in three rows of three. Eight frames are teal and hold simple shapes: bars, rings, a zigzag line, dots, a hill, stacked blocks. The ninth frame is orange and empty.

Every Chart Type in the Maximo Application Framework (and the One Nobody Uses)

The framework behind Maximo Mobile and the web apps of Manage can draw nine kinds of chart. You name the kind in one attribute, give it a datasource, and say which column goes where. This page shows all nine as they come out of the framework, with the markup of the simplest one and the options that change a picture.

MAS 9.2 series reference

Every picture on this page comes from our Components Explorer, on our test system of the MAS 9.2 series. The charts read small lists that are part of the app, so the pictures need no data from Maximo. The counts come from the source of the apps that IBM ships with that series.

A chart in six lines
#

A chart is the element <chart>. A bar chart needs a type, a datasource and two axes:

<chart id="fs_d_charts_bar" type="bar" datasource="fs_d_charts_ds_status" height="240px">
  <chart-axis id="fs_d_charts_bar_abottom" position="bottom" data-field="wostatus" title="Status"/>
  <chart-axis id="fs_d_charts_bar_astart" position="start" data-field="wocount" title="Work orders" scale-type="linear"/>
  <chart-legend id="fs_d_charts_bar_l" position="bottom" enabled="false"/>
</chart>

Our page has two more attributes on the element, for a click, and we leave them out here. The datasource behind the chart is a list of four rows, each with a status and a number. On a dashboard the same chart is a tile, <dashboard-chart-tile>, and the type is its attribute chart-type. Anatomy of a MAF Dashboard shows such tiles.

The nine types, and how often IBM uses each
#

We counted the charts in the source of IBM’s shipped apps, as pages and as dashboard tiles:

TypeWhat it is forCharts in IBM’s apps
linea value over time24
donutparts of a whole, with the total in the middle14
bara measure across categories10
stacked-bara measure split into parts, per category8
grouped-barseveral measures side by side, per category4
scattertwo measures against each other, one point per record4
areaa line with the space below it filled3
circle-packcircles inside circles: a hierarchy with sizes1
pieparts of a whole0

The 56 apps that IBM ships with the MAS 9.2 series: 68 charts in ten apps, 55 of them as dashboard tiles and 13 as the element <chart>.

Three things stand out. A third of all charts are lines. One app, with the id RELENGINEER, holds 32 of the 68. And pie is the type nobody uses: the framework draws it, and none of the 56 apps has one.

bar
#

A bar chart: four purple bars for the status values WAPPR, APPR, INPRG and COMP, with the heights 4, 9, 6 and 3. The axis below reads Status, the axis at the side Work orders.
bar: one bar per category

One bar per row of the datasource. It is the plain answer to “how many of each”.

line
#

A line chart: one purple line with six points, for the months January to June, between 9 and 26 work orders.
line: a value over time

One point per row, joined in the order of the rows. With a group column, each group becomes a line of its own.

area
#

An area chart: the same six months as a line, with the space under the line filled in light purple.
area: a line with the space below it filled

The same data as the line, with weight. It suits one series whose volume matters.

stacked-bar
#

A stacked bar chart: three bars for the work types PM, CM and EM. Each bar has a purple part for labor and a teal part for material, and a legend below names the two.
stacked-bar: the parts of each bar sum to its height

Three columns of the datasource do the work: the category, the group and the value. The parts of a bar add up, so the bar shows the total too.

grouped-bar
#

A grouped bar chart: the same three work types, each with a purple bar for labor and a teal bar for material side by side.
grouped-bar: the same data, side by side

The same three columns as the stacked bar. The bars stand side by side, which makes the parts easy to compare and hides the total.

donut
#

A donut chart with four segments, for the priorities Medium, High, Low and Emergency, with 44.4, 25.9, 18.5 and 11.1 percent. The middle of the ring reads 27, Work orders. A legend below names the four.
donut: parts of a whole, and the total in the middle

The ring leaves room for a number. The chart adds up the values and prints the sum in the middle, with a label that you set.

pie
#

A pie chart with three slices, for the crafts Mechanic, Electrician and Instrument, with 47.4, 31.6 and 21.1 percent. A legend below names the three.
pie: the type that no app of IBM uses

The pie works like the donut and has no middle. In our pictures its legend needed more room than the chart had: we gave the pie 300 pixels of height where the bar has 240.

scatter
#

A scatter chart: six points for the age of an asset in years against its number of failures, in purple for pumps and teal for motors.
scatter: two measures, one point per record

Both axes are numbers. Each row is a point, and the group column gives the colour.

circle-pack
#

A circle pack chart: three large circles in pink, blue and purple, for Mechanical, Electrical and Instrument. Each holds two smaller circles of different size.
circle-pack: a hierarchy, with the size of each part

The rows have children: each large circle is a row, and the small circles are its children with their values. We set an option that says how deep it draws.

On a wide screen
#

The bar chart on a wide screen: the same four bars, now spread over the full width.
The same bar chart at almost three times the width

A chart takes the width it gets. The bars and the lines spread out. The round charts do not grow with the width, and they sit at the start of the space. Nine Chart Types on a Phone shows that case and the option that moves them to the middle.

Seven variants, one change each
#

A chart has four kinds of children: <chart-axis>, <chart-legend>, <chart-toolbar> and <chart-option>. The first three have attributes of their own. The fourth passes a named option to the chart library behind the framework, Carbon Charts. Each picture below changes one thing.

No toolbar
#

The bar chart with no icons above it.
chart-toolbar with enabled=false

Every chart has three icons at its top by default: a table, a full screen view and a menu. <chart-toolbar enabled="false"/> takes them away.

The categories at the side
#

A bar chart with horizontal bars: the four status values stand at the left side, and the bars run to the right.
The category axis at the start, the number axis at the bottom

The two axes changed places. The axis at the start holds the categories with scale-type="labels", and the axis at the bottom holds the numbers. The bars lie down, which leaves room for long names.

Two series, own colours, a curve
#

A line chart with two curved lines over six months: Created in teal and Completed in orange, with a legend below.
Two series from one group column, with a colour for each and a smooth curve

The datasource has twelve rows, six for each series. The option data.groupMapsTo names the column that tells them apart. The option color gives each group its colour, and curve rounds the lines.

Two series in an area chart
#

An area chart with two filled areas over six months, Created in teal and Completed in orange, one lying over the other.
Two areas lie over each other

The two areas lie over each other. We also set stacked="true" on the number axis, as on the stacked bar, and the areas did not add up.

The donut in the middle
#

A donut chart in the middle of its space, with segments in teal, orange, black and rose.
donut.alignment=center, and a colour for each priority

The option donut.alignment with the value center moves the ring to the middle. The colours follow the names of the groups.

The pie in the middle, the legend at the top
#

A pie chart in the middle of its space, in the same four colours, with its legend above it.
pie.alignment=center, and a legend with position=top

The pie has an option of its own, pie.alignment. The legend moved to the top with position="top" on <chart-legend>.

The stacked bar in own colours
#

A stacked bar chart with labor in teal and material in orange, and the legend above the chart.
The colour option on a stacked bar

The same color option as on the line. It maps a name of a group to a colour.

The table behind every chart
#

A screen with the title “Tabular representation”: a table with the columns Group, Status and Work orders and four rows, and a cross to close it.
The first icon of the toolbar shows the numbers as a table

The first icon of the toolbar opens the numbers of the chart as a table. Below the rows, the table has a button to download them as CSV. The toolbar comes with every chart and needs no code.

Which type to pick
#

  • A trend over time: line. Take area for one series whose volume matters.
  • Categories: bar. Put the categories at the side when their names are long.
  • Parts of a total, per category: stacked-bar. Take grouped-bar when the parts are to be compared and the total does not matter.
  • Parts of one whole: donut, with the total in the middle. With many segments, we take a bar chart.
  • A click that has to do something: check the type first. Two Chart Types That Did Not Answer a Click names the two that stay silent.

What to read next#

Charts Work in Maximo Mobile. Nobody Ships One. puts the charts into a mobile app. Maximo-Datasource vs. JSON-Datasource explains the kind of datasource behind these pictures.


IBM documents <chart>, <chart-axis>, <chart-legend>, <chart-toolbar> and <chart-option> in the product itself, in the Application Configuration application under Component Documentation. The options that <chart-option> passes on are described in the documentation of Carbon Charts.