AxisSpec.setAllTicks(boolean)

Specifies whether tick marks should be shown for unlabeled data points.

Parameter

boolean true: show all ticks

false: show ticks for labeled points

Note: Script that modifies 'graph' should be placed at the element level. See Adding Element-Level Script in Report Scripting and Adding Component Script in Dashboard Scripting for more information.

Example (Report or Viewsheet)

For a report, add a blank chart and bind the chart to the sample 'All Sales' query. For a Viewsheet, create a new Viewsheet based on the sample 'All Sales' query, and add a blank chart. The follow the steps below:

1. Open the Chart Editor for the chart, and drag 'Order Date' to the X-axis and 'Total' to the Y-axis.

2. Press the 'Edit Dimension' button next to the 'Order Date' field and select 'Month' from the 'Level' menu. Press the green 'Apply' button.

 

3. Add the following element-level script to the chart, and preview.

var fmt = new inetsoft.uql.XFormatInfo;

fmt.setFormat(Chart.DATE_FORMAT);

fmt.setFormatSpec("yyyy")

axis['Month(Order Date)'].format = fmt;

graph.getScale('Month(Order Date)').getAxisSpec().setAllTicks(true);

 

Observe that ticks are displayed for every month, even though the 'yyyy' date format displays labels only for the years.

See Also

axis.ticksVisible, to set visibility of axis ticks.

LinearScale.setMinorIncrement(value), to set tick spacing for a linear scale.

<< AxisSpec.setAbbreviate(boolean) © 1996-2013 InetSoft Technology Corporation (v11.4) AxisSpec.setAxisStyle(value) >>