13 Working with Charts

Charts can be used to visualize signals and signal-related information. Charts can be extended and configured in many ways. You can define your own charts or integrate existing chart tools.

To visualize a signal with impulse, users usually define a plot with a source signal and a diagram type (e.g. a line diagram) and some additional parameters (e.g. the 'annotate' flag). If you select "Chart" as diagram type, you will need to state which chart to use. impulse comes with a set of predefined charts, but user can re-define and extend. Each chart then comes with an additional set of parameters to configure the selected chart.

Charts vs 'normal' diagrams

  • Charts have their own axis, whereas normal diagrams use the shared axis in the top row.
  • Charts horizontally fill the whole screen (but can share the screen with subsequent charts),  whereas normal diagrams can be zoomed.
  • Charts can be extended.
  • Users can define new chart types.

Steps to show a chart

On opening the preferences pages of impulse, you will find the chart settings. This is the place where all charts are defined and configured. You can use the impulse wallet to exchange charts and other configurations with your colleagues. Here are the basic steps to get a chart displayed.

  1. Get to chart preferences and create/ configure a chart (optional).
  2. Select a signal of a type that is compatible with the intended chart, or
  3. Prepare a signal script to set-up the chart data.
  4. Select the chart type in the plot configuration dialogue and fill the additional parameters.

For your first experiments with charts, you may use this wave file: charts.recJs

 

Script charts

Script charts allow the user to script his own chart.

Script chart example

  // gc: graphics context (https://www.eclipse.org/articles/Article-SWT-graphics/SWT_graphics.html)
  // x,y,width,height: geometry
  // color, background: Colors
  // readable: input of IReadableSamples  (http://toem.de/index.php/projects/impulse/scripts/reference)
  
  gc.setForeground(color);
  var count = readable.getCount();
  var first = readable.positionAt(0);
  var last = readable.positionAt(count-1);
  var value0 = readable.valueAt(0);
  var valueN = readable.valueAt(count-1);

  gc.drawText("Count: " +count,x+20,y+20);
  gc.drawText("From: " +first,x+20,y+40);
  gc.drawText("To: " +last,x+20,y+60);
  gc.drawText("Value[0]: " +value0,x+20,y+80);
  gc.drawText("Value[N]: " +valueN,x+20,y+100);
  
  gc.setBackground(color);
  gc.fillRectangle(x+20,y+120,width-40,20);
  gc.setBackground(gc.getDevice().getSystemColor(7));
  gc.fillRectangle(x+20,y+150,width-40,20);
  gc.setBackground(gc.getDevice().getSystemColor(15));
  gc.fillRectangle(x+width - 50,y+20,20,height - 40);
  
  gc.setForeground(color);
  gc.setBackground(background);
  gc.drawText("Impulse Script Chart ",x+20,y+180);

Core chart types

  • Script Chart

    Script Chart

    Script charts allow the user to extract relevant information from the signal and paint a visualisation using core swt funtions.

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Status
    • Stable
    Supported signal types
    • Manual fill

Chart types supported by the BIRT extension

The impulse BIRT extension is not part of the core features of impulse and must be installed separately using the installation dialog.

  • impulse Birt Chart Extension

    BIRT is an open source technology platform used to create data visualizations and reports that can be embedded into rich client and web applications.

    This extension includes Bar, Pie, Line and Radar charts. It supports the Birt script extension mechanism (see the book "Integrating and Extending BIRT"). You can display:

    • Numerical signals (Integer, Float) - The chart will show each numerical change.
    • Struct signals - The chart shows each numerical member of multiple struct values (like a table).
    • Any other signal by using a script production to analyze the source signal and preparing structural data for the chart.
  • License
    • EPL
    Sources
    • Available in the plugin package
  • Pie Chart

    BIRT Pie Chart

    .

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • BIRT chart engine (org.eclipse.birt)
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Struct with numeric members
    • Integer array
    • Float array
    • Text member with content descriptor "LABEL" will be used as sample label
  • Bar Chart

    BIRT Bar Chart

    .

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • BIRT chart engine (org.eclipse.birt)
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Struct with numeric members
    • Integer array
    • Float array
    • Text member with content descriptor "LABEL" will be used as sample label
  • Line Chart

    BIRT Line Chart

    .

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • BIRT chart engine (org.eclipse.birt)
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Struct with numeric members
    • Integer array
    • Float array
    • Text member with content descriptor "LABEL" will be used as sample label
  • Radar Chart

    BIRT Radar Chart

    .

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • BIRT chart engine (org.eclipse.birt)
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Struct with numeric members
    • Integer array
    • Float array
    • Text member with content descriptor "LABEL" will be used as sample label

Chart types supported by the Nebula extension

The impulse Nebula extension is not part of the core features of impulse and must be installed separately using the installation dialog.

  • impulse Nebula Chart Extension

    Nebula Visualization is a widgets library for data visualization in science, engineering and SCADA areas. These widgets are originally from CSS BOY project.

    This extension includes XY (Line), Intensity and Eye charts. It supports script extensions. You can display:

    • Numerical signals (Integer, Float) with 1 or 2 members (XY)
  • License
    • EPL
    Sources
    • Available in the plugin package
  • XY Chart

    Nebula XY Chart

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Integer
    • Float
    • Integer array
    • Float array
    • Manual fill
  • Eye Chart

    Nebula Eye Chart

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Integer
    • Float
    • Integer array
    • Float array
    • Manual fill
  • Intensity Chart

    Nebula Intensity Chart

    Platforms
    32/64bit 32/64bit 32/64bit
    Requirements
    • None
    Known limitations
    • None
    Status
    • Stable
    Extending
    • JavaScript
    Supported signal types
    • Manual fill