ChartDirector 6.0 (Ruby Edition)

JsChartViewer.toCssH


Usage

toCssH(h)

Description

Convert vertical height from chart pixel unit to CSS pixel unit.

The CSS pixel unit is the pixel unit in HTML. If a chart image is shown in its natural size (the pixel size that the chart is created), the chart pixel unit should be the same as the CSS pixel unit. However, some web pages are designed such that the charts may not be displayed at their natural size. For example, on mobile web pages, the charts may be resized to fit the mobile device screens. If programmable track cursor is used, it is often necessary to draw HTML lines, text and dots on the chart. The toCssH method can be used to convert from chart pixel unit to CSS pixel unit, so that the HTML contents can be properly sized relative to the chart.

Arguments

ArgumentDefaultDescription
h(Mandatory)The height in chart pixel unit to be converted to CSS pixel unit.

Return Value

The height in CSS pixel unit.