MindFusion.Charting for JavaScript Programmer's Guide
GeometryFactory.createLinearGeometry Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

Generates a linear bar geometry with the specified parameters.

Namespace: MindFusion.Gauges
File: GeometryFactory.js

## Syntax

JavaScript Copy Code
function createLinearGeometry (centerX, centerY, startInnerOffset, startOuterOffset, endInnerOffset, endOuterOffset, length, isVertical, capStart, capEnd, strokeInner, strokeOuter)

### Parameters

centerX

  Type: Number
  Number. The x-coordinate of the generated geometry.

centerY

  Type: Number
  Number. The y-coordinate of the generated geometry.

startInnerOffset

  Type: Number
  Number. The start inner offset of the generated geometry relative to the specified center.

startOuterOffset

  Type: Number
  Number. The start outer offset of the generated geometry relative to the specified center.

endInnerOffset

  Type: Number
  Number. The end inner offset of the generated geometry relative to the specified center.

endOuterOffset

  Type: Number
  Number. The end outer offset of the generated geometry relative to the specified center.

length

  Type: Number
  Number. The length of the generated geometry.

isVertical

  Type: Boolean
  Boolean. A flag indicating whether the generated geometry is vertical.

capStart

  Type: Boolean
  Boolean. A flag indicating whether to draw a stroke at the start of the bar.

capEnd

  Type: Boolean
  Boolean. A flag indicating whether to draw a stroke at the end of the bar.

strokeInner

  Type: Boolean
  Boolean. A flag indicating whether to draw a stroke at the inner side of the bar.

strokeOuter

  Type: Boolean
  Boolean. A flag indicating whether to draw a stroke at the outer side of the bar.

### Return Value

A PathFigure representing a linear bar with the specified parameters.

## Remarks

The generated geometry is a trapezium.For example, a vertical linear geometry with centerX = 10, centerY = 10,startInnerOffset = 0, startOuterOffset = 5, endInnerOffset = 0, endOuerOffset = 10,length = 100; will be a trapezium with points (10, 110), (15, 110), (20, 10), (10, 10).A horizontal lienar geometry with the above parameters will be a trapeziumwith points (10, 10), (10, 15), (110, 20), (110, 10).

## See Also

GeometryFactory Members
GeometryFactory Class
MindFusion.Gauges Namespace