openmct/platform/features/plot
Victor Woeltjen 374c363a78 [Plot] Handle telemetry panels from plot policy (#1732)
* [Plot] Check for telemetry panels

...from plot view policy, and don't try to interrogate them
for telemetry metadata that they will not have.

Fixes #1728

* [Plot] Update test case for policy

...to provide an adapted object with expected properties

* [Plot] Add tests to very plot policy for panels

...to verify fix for #1728
2017-09-25 14:27:32 -07:00
..
res/templates [Licenses] Update copyright year to 2017 2017-04-05 14:52:46 -07:00
src [Plot] Handle telemetry panels from plot policy (#1732) 2017-09-25 14:27:32 -07:00
test [Plot] Handle telemetry panels from plot policy (#1732) 2017-09-25 14:27:32 -07:00
bundle.js [Plot] Update policy to detect any range 2017-09-16 09:58:58 -07:00
README.md [Reorg] Make timeline-specific chart directive 2017-01-17 09:59:00 -08:00

Plot README

Chart

The mct-chart directive is used to support drawing of simple charts. It is present to support the Plot view, and its functionality is limited to the functionality that is relevant for that view.

This directive is used at the element level and takes one attribute, draw which is an Angular expression which will should evaluate to a drawing object. This drawing object should contain the following properties:

  • dimensions: The size, in logical coordinates, of the chart area. A two-element array or numbers.
  • origin: The position, in logical coordinates, of the lower-left corner of the chart area. A two-element array or numbers.
  • lines: An array of lines (e.g. as a plot line) to draw, where each line is expressed as an object containing:
    • buffer: A Float32Array containing points in the line, in logical coordinates, in sequential x,y pairs.
    • color: The color of the line, as a four-element RGBA array, where each element is a number in the range of 0.0-1.0.
    • points: The number of points in the line.
  • boxes: An array of rectangles to draw in the chart area. Each is an object containing:
    • start: The first corner of the rectangle, as a two-element array of numbers, in logical coordinates.
    • end: The opposite corner of the rectangle, as a two-element array of numbers, in logical coordinates. color : The color of the line, as a four-element RGBA array, where each element is a number in the range of 0.0-1.0.

While mct-chart is intended to support plots specifically, it does perform some useful management of canvas objects (e.g. choosing between WebGL and Canvas 2D APIs for drawing based on browser support) so its usage is recommended when its supported drawing primitives are sufficient for other charting tasks.