LogScale

The LogScale object contains a logarithmic scale, i.e., a Scale that logarithmically maps numerical data values to physical attributes (axis position, element size, etc.). To create a LogScale object, call the LogScale constructor.

var qscale = new LogScale('Last Year', 'This Year');

You can pass the names of the fields (e.g., ‘Last Year’, ‘This Year’) for which the scale should be generated to the constructor, or specify these later using the inherited Scale.setFields(field) property. It also provides a LogScale.setBase(value) method.

Example

Chart Component Script
dataset = [["State","Quantity"], ["NJ",200], ["NY",2000]]; (1)
graph = new EGraph();
var qscale = new LogScale(); (2)
qscale.setFields(["Quantity"]);
var elem = new IntervalElement("State", "Quantity");
graph.setScale("Quantity", qscale); (3)
graph.addElement(elem);
1 See dataset to use a data block instead of an array literal.
2 Create the LogScale object.
3 Use EGraph.setScale(field, scale) to add the Scale to the Chart.

LogScale

Script that modifies the graph or dataset properties should be placed on the Chart component itself. See Add Component Script for more information. This script has access to the Chart data and Chart API methods. Scripted Charts are not good candidates for user-modification, so you should deselect ‘Enable Ad Hoc Editing’ in the Chart Properties dialog box.