13 Working with Charts

Posted in manual

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

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

The only chart type supported by the core feature of impulse is the script chart.  
Script charts can be seen as low-level charts, were the user has everything in hands:

See below script chart example that you also find in the impulse preferences:

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 of impulse extensions

  • 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

  • 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

Print

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive