GAP (Francy) - Chapter 4: Francy Charts

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

4 Francy Charts
4.1 Categories
4.1-1 IsChart
4.1-2 IsChartType
4.1-3 IsChartDefaults
4.1-4 IsAxisScaleType
4.1-5 IsXAxis
4.1-6 IsYAxis
4.1-7 IsDataset
4.2 Families
4.3 Representations
4.3-1 IsChartRep
4.3-2 IsChartDefaultsRep
4.3-3 IsChartTypeRep
4.3-4 IsAxisScaleTypeRep
4.3-5 IsAxisRep
4.3-6 IsDatasetRep
4.4 Operations
4.4-1 Chart
4.4-2 Add
4.4-3 Remove
4.4-4 Dataset
4.4-5 DefaultAxis
4.4-6 XAxis
4.4-7 YAxis
4.5 Global
4.6 Attributes
4.6-1 ShowLegend
4.6-2 ShowLegend
4.6-3 SetShowLegend
4.6-4 AxisXTitle
4.6-5 AxisXTitle
4.6-6 SetAxisXTitle
4.6-7 AxisYTitle
4.6-8 AxisYTitle
4.6-9 SetAxisYTitle
4.6-10 AxisXDomain
4.6-11 AxisXDomain
4.6-12 SetAxisXDomain

### 4 Francy Charts

It is possible to build `Charts` with simple `Datasets`.

Currently, Francy, supports Bar, Line and Scatter Charts.

Please see Francy-JS for client implementation.

#### 4.1 Categories

In this section we show all Francy Chart Categories.

##### 4.1-1 IsChart

`‣ IsChart`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `Chart` objects.

##### 4.1-2 IsChartType

`‣ IsChartType`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `ChartType` objects.

##### 4.1-3 IsChartDefaults

`‣ IsChartDefaults`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `ChartDefaults` objects.

##### 4.1-4 IsAxisScaleType

`‣ IsAxisScaleType`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `AxisScaleType` objects.

##### 4.1-5 IsXAxis

`‣ IsXAxis`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `XAxis` objects.

##### 4.1-6 IsYAxis

`‣ IsYAxis`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `YAxis` objects.

##### 4.1-7 IsDataset

`‣ IsDataset`( arg ) | ( filter )

Returns: `true` or `false`

Identifies `Dataset` objects.

#### 4.2 Families

In this section we show all Francy Chart Families.

#### 4.3 Representations

In this section we show the Francy Chart Representations.

##### 4.3-1 IsChartRep

`‣ IsChartRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `Chart` internal representation.

##### 4.3-2 IsChartDefaultsRep

`‣ IsChartDefaultsRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `ChartDefaults` internal representation.

##### 4.3-3 IsChartTypeRep

`‣ IsChartTypeRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `ChartType` internal representation.

##### 4.3-4 IsAxisScaleTypeRep

`‣ IsAxisScaleTypeRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `AxisScaleType` internal representation.

##### 4.3-5 IsAxisRep

`‣ IsAxisRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `AxisRep` internal representation.

##### 4.3-6 IsDatasetRep

`‣ IsDatasetRep`( arg ) | ( filter )

Returns: `true` or `false`

Checks whether an `Object` has a `DatasetRep` internal representation.

#### 4.4 Operations

In this section we show all Francy Chart Operations.

##### 4.4-1 Chart

`‣ Chart`( IsChartType[, IsChartDefaults] ) | ( operation )

Returns: `Chart`

Every object to draw will be a subclass of this object. This will allow all the objects to contain the same base information.

Examples:

Create a simple `Chart` of type `ChartType.BAR`:

    gap> chart:=Chart(ChartType.BAR);
    gap> SetAxisXTitle(chart, "X Axis");
    gap> AxisXTitle(chart);
    gap> SetAxisXDomain(chart, ["domain1", "domain2", "domain3", "domain4", "domain5"]); # default []
    gap> AxisXDomain(chart);
    gap> SetAxisYTitle(chart, "Y Axis");
    gap> AxisYTitle(chart);
    gap> data1 := Dataset("data1", [100,20,30,47,90]);
    gap> data2 := Dataset("data2", [51,60,72,38,97]);
    gap> data3 := Dataset("data3", [50,60,70,80,90]);
    gap> Add(chart, [data1, data2, data3]);
    gap> Remove(chart, data1);
    gap> Add(chart, data1);
    gap> Remove(chart, [data2, data3]);
    gap> Length(RecNames(chart!.data)) = 1;

Create a simple `Chart` of type `ChartType.LINE`:

    gap> chart:=Chart(ChartType.LINE);
    gap> SetAxisXTitle(chart, "X Axis");
    gap> SetAxisYTitle(chart, "Y Axis");
    gap> data1 := Dataset("data1", [100,20,30,47,90]);
    gap> Add(chart, data1);

Create a simple `Chart` of type `ChartType.SCATTER`:

    gap> chart:=Chart(ChartType.SCATTER);
    gap> SetAxisXTitle(chart, "X Axis");
    gap> SetAxisYTitle(chart, "Y Axis");
    gap> data1 := Dataset("data1", [100,20,30,47,90]);
    gap> Add(chart, data1);

##### 4.4-2 Add

`‣ Add`( IsChart[, IsDataset, List(IsDataset)] ) | ( operation )

Returns: `Chart`

Adds a `Dataset` to a specific `Chart`.

##### 4.4-3 Remove

`‣ Remove`( IsChart[, IsDataset, List(IsDataset)] ) | ( operation )

Returns: `Chart`

Removes a `Dataset` from a specific `Chart`.

##### 4.4-4 Dataset

`‣ Dataset`( IsString(title), IsList(data) ) | ( operation )

Returns: `Dataset`

Creates a dataset.

##### 4.4-5 DefaultAxis

`‣ DefaultAxis`( IsChartType ) | ( operation )

Returns: `rec`

Returns the default settings for a `ChartType`

##### 4.4-6 XAxis

`‣ XAxis`( IsAxisScaleType, IsString(title), IsList(domain) ) | ( operation )

Returns: `XAxis`

Creates a XAxis

##### 4.4-7 YAxis

`‣ YAxis`( IsAxisScaleType, IsString(title), IsList(domain) ) | ( operation )

Returns: `YAxis`

Creates a YAxis

#### 4.5 Global

In this section we show all Global Chart Francy Records for multi purpose.

#### 4.6 Attributes

In this section we show all Francy Attributes

##### 4.6-1 ShowLegend

`‣ ShowLegend`( arg ) | ( attribute )

Returns: `IsBool` True if enabled otherwise False

`ShowLegend` is a property that enables or disables the legend in the client implementation.

##### 4.6-2 ShowLegend

`‣ ShowLegend`( arg1 ) | ( operation )

##### 4.6-3 SetShowLegend

`‣ SetShowLegend`( IsChart, IsBool ) | ( operation )

`ShowLegend` is a property that enables or disables the legend in the client implementation.

##### 4.6-4 AxisXTitle

`‣ AxisXTitle`( arg ) | ( attribute )

Returns: `IsString` with the title of the object

This title is used to display the X Axis Title in the client implementation.

##### 4.6-5 AxisXTitle

`‣ AxisXTitle`( arg1 ) | ( operation )

##### 4.6-6 SetAxisXTitle

`‣ SetAxisXTitle`( IsChart, IsString ) | ( operation )

This title is used to display the X Axis Title in the client implementation.

##### 4.6-7 AxisYTitle

`‣ AxisYTitle`( arg ) | ( attribute )

Returns: `IsString` with the title of the object

This title is used to display the Y Axis Title in the client implementation.

##### 4.6-8 AxisYTitle

`‣ AxisYTitle`( arg1 ) | ( operation )

##### 4.6-9 SetAxisYTitle

`‣ SetAxisYTitle`( IsChart, IsString ) | ( operation )

This title is used to display the Y Axis Title in the client implementation.

##### 4.6-10 AxisXDomain

`‣ AxisXDomain`( arg ) | ( attribute )

Returns: `IsList`

This is the domain of the X Axis values in the client implementation.

##### 4.6-11 AxisXDomain

`‣ AxisXDomain`( arg1 ) | ( operation )

##### 4.6-12 SetAxisXDomain

`‣ SetAxisXDomain`( IsList, IsList ) | ( operation )

This is the domain of the X Axis values in the client implementation.

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Ind

generated by GAPDoc2HTML