OTRS API Reference JavaScript

Namespace: Core.UI.AdvancedChart

Core.UI. AdvancedChart

Chart drawing.
Author:
  • OTRS AG
Source:

Methods

(static) ConvertSVGtoBase64($SVGContainer) → {String}

Convert an SVG element to an SVG data URL.
Parameters:
Name Type Description
$SVGContainer jQueryObject The element containing the SVG element. There should be no other content.
Source:
Returns:
- The base64 data URL containing the SVG data with a proper XML header.
Type
String

(static) ConvertSVGtoPNG($SVGContainer) → {String}

Convert an SVG element to a PNG data URL.
Parameters:
Name Type Description
$SVGContainer jQueryObject The element containing the SVG element. There should be no other content.
Source:
Returns:
- The base64 data URL containing the PNG data.
Type
String

(static) Init(Type, RawData, Element, Options)

Initializes a chart.
Parameters:
Name Type Description
Type String Type of the chart, e.g. Bar, Line, StackedArea, etc.
RawData Object Raw JSON data.
Element DOMObject Selector of the (SVG) element to use.
Options Object Additional options.
Properties
Name Type Attributes Description
HideLegend Boolean <optional>
Don't display the legend (optional).
Duration Boolean <optional>
Transition duration in ms, default 0 (no transition).
PreferencesKey Boolean <optional>
Name of an agent preferences key save persistent D3 statistic settings to (currently used from the dashboard).
PreferencesData Boolean <optional>
Current value of the D3 statistic graph settings.
Source:

(static) UpdatePreferences(PrefName, PrefValue)

Update chart preferences on server.
Parameters:
Name Type Description
PrefName String
PrefValue Array
Source: