How Do I Create and Customize a Categorical Bar Chart?

In order to customize a categorical bar chart with the View Manager, you can proceed like this:

  1. Open your graph file (.slg) and the Open View Dialog will pop up. Select “cartesian chart” as view type on the left-hand side of the dialog window and “categorical chart” as default view template. In contrast to XY charts, the horizontal axis of a categorical chart represents categorical attribute values (i.e. name, id…) rather than a numerical scale (as in the XY chart).
    View Settings for the Categorical Chart
    View Settings for the Categorical Chart

    In the view settings, you can select your preferred chart kind (i.e. bar chart), the data set you would like to plot (in the shown example, we would like the costs of all part nodes), the category (which will be assigned to the horizontal axis) and the value (which will be assigned to the vertical axis).  In our example, we set the unique categorical part attribute “id” as category for the X axis and select the part attribute cost as “value” in order to visualize the part cost. The resulting visualization looks like this:

    Example for a Cartesian Chart View
    Example for a Categorical Chart View

    This chart helps us to visually identify the most expensive parts. By zooming we can find out the parts´ id numbers.

  2. Customize your view: Select “Bar plot” in the View Manager to adapt all bars or pick one in the view to adapt a single bar. In the Properties pad you can then set the data properties (“Which properties would you like to plot a x and y values?”) and the view properties (“How do you want your plot to look like?”) in the properties pad. A click on the “…” button will open the Edit Property dialog, which helps you to fine tune your visualization. At the end of this article you find a table of all customizable properties.

    Modify the Properties of the Bar Chart in the Properties Pad
    Modify the Properties of the Bar Chart in the Properties Pad
  3.  Click on the canvas in order to customize the chart´s background. Again, you can do so by modifying its view properties in the properties pad. All available properties for the canvas are also described in the table below.
  4. As soon as you are happy with your customized view, you can save the graph in this view. If you want to reuse the settings for other graph files you can extract a view template, which you can then use to open the graph with. You can find your saved view templates under “My View Templates2 in the Open View Dialog.

    Extract a View Template and Save It for Reuse. You find it under My View Templates in the Open View Dialog
    Extract a View Template and Save It for Reuse

Adaptable Data and View Properties

Graph ElementsProperty NameDescription
Node, EdgeLabel TextDefines the label text
Node, EdgeTooltipDefines the text which is showed while hovering over the element with the mouse
Nodes, Edges, LegendLegend TitleDefines the title of the chart legend
Nodes, Edges, LegendShow LabelsDefines whether labels are shown or hidden
Nodes, EdgesValueDefines the attribute the slice size is related to
CanvasTitleDefines the title of the chart
CanvasHorizontal AxisDefines how this axis shall be scaled, i.e. Linear, Categorical, DateTimeContinuousAxis
CanvasHorizontal Axis Label Fit ModeDefines, how the horizontal axis text is displayed.
CanvasHorizontal Axis Smart Labels OnUse smart labels to avoid overlapping axis labels
CanvasVertical AxisDefines how this axis shall be scaled, i.e. Linear, Categorical, DateTimeContinuousAxis
CanvasVertical Axis Smart Labels OnUse smart labels to avoid overlapping axis labels
Nodes, EdgesCategoryDefines which attribute is shown on the x-axis
Nodes, EdgesValueDefines which attribute is shown on the y-axis
Nodes, Edges, LegendColorDefines the color of the visualized elements
Nodes, Edges, LegendHorizontal Axis TitleDefines the title of the x-axis
Nodes, Edges, LegendSort byDefines an attribute by which the elements are sorted
Nodes, Edges, LegendSort directionDefines whether the elements are sorted descending or ascending
Nodes, Edges, LegendVertical Axis TitleDefines the title of the y-axis
CanvasShow Track BallEnables the trackball to quickly extract all relevant data while hovering over graph elements
Nodes, EdgesCombine ModeDefine combination of multiple data sets as clustered bars, stacked bars or stacked 100 bars. See this article for details

Was this article helpful?

Related Articles