Skip to content

Commit

Permalink
change links to version 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
stockiNail committed Feb 10, 2024
1 parent ee46972 commit f2e428c
Show file tree
Hide file tree
Showing 89 changed files with 2,470 additions and 2,470 deletions.
40 changes: 20 additions & 20 deletions docs/Controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ For this reason, **Charba** provides the interfaces to create controllers **ONLY

To create own chart type, you need to perform some specific and mandatory steps:

1. create a [controller type](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/controllers/ControllerType.html)
2. implement the [controller](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html) interface where all hooks are defined
3. extend the [dataset](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/data/Dataset.html) class of the original chart type
4. extend the [chart](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/IsChart.html) class of the original chart type
1. create a [controller type](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/controllers/ControllerType.html)
2. implement the [controller](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html) interface where all hooks are defined
3. extend the [dataset](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/data/Dataset.html) class of the original chart type
4. extend the [chart](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/IsChart.html) class of the original chart type

### Creating a controller type

Expand All @@ -35,7 +35,7 @@ This id should follow the name convention (otherwise an [illegal argument](http
* can not start with a dot or an underscore
* can not contain any non-URL-safe characters

The [controller type](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/controllers/ControllerType.html) is an entity which must be implemented for every controller you want to implement. A controller type implements [Type](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Type.html) interface like all other chart types available out-of-the-box.
The [controller type](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/controllers/ControllerType.html) is an entity which must be implemented for every controller you want to implement. A controller type implements [Type](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Type.html) interface like all other chart types available out-of-the-box.

Here are the way how to create a controller type:

Expand All @@ -52,7 +52,7 @@ ControllerType myLine = new ControllerType("myline", ChartType.LINE, new Control
});
```

The controller type constructor is getting a [controller provider](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/controllers/ControllerProvider.html) instance as argument in order to provide the controller during the registration.
The controller type constructor is getting a [controller provider](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/controllers/ControllerProvider.html) instance as argument in order to provide the controller during the registration.

The controller is usually automatically registered in [Chart.JS](http://www.chartjs.org/) when used. Anyway the controller type object is providing the method to **register** the controller programmatically in [Chart.JS](http://www.chartjs.org/):

Expand All @@ -61,7 +61,7 @@ The controller is usually automatically registered in [Chart.JS](http://www.char
myControllerType.register();
```

You can also be notified when and if the registration of the controller ended correctly. This is done by the implementation of [ControllerRegistrationHandler](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/controllers/ControllerRegistrationHandler.html) interface to set during the controller type creation.
You can also be notified when and if the registration of the controller ended correctly. This is done by the implementation of [ControllerRegistrationHandler](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/controllers/ControllerRegistrationHandler.html) interface to set during the controller type creation.

```java
// creates a chart extending the existing chart LINE
Expand Down Expand Up @@ -95,15 +95,15 @@ ControllerType myLine = new ControllerType("myline", ChartType.LINE, myControlle

### Hooks

A controller must implement the [Controller](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html) interface which is containing all hooks which will be invoked during the whole chart life cycle.
A controller must implement the [Controller](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html) interface which is containing all hooks which will be invoked during the whole chart life cycle.

The interface provides **before** and **after** hooks for each phases exposes by [Chart.JS controller](https://www.chartjs.org/docs/4.3.0/developers/charts.html):

#### Initialization

Every controller is initialized every time new chart instance is creating.

The following hooks (the following ones are the methods definitions in the [Controller](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html)) can be used to initialize the chart:
The following hooks (the following ones are the methods definitions in the [Controller](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html)) can be used to initialize the chart:

```java
/**
Expand Down Expand Up @@ -140,8 +140,8 @@ flowchart TD
style C fill:#FFFFFF,stroke:#000000
style D fill:#D5E8D4,stroke:#82B366
style E fill:#FFF2CC,stroke:#D6B656
click B href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onBeforeInitialize(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeInitialize" _blank
click D href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onAfterInitialize(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterInitialize" _blank
click B href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onBeforeInitialize(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeInitialize" _blank
click D href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onAfterInitialize(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterInitialize" _blank
```

#### Rendering
Expand Down Expand Up @@ -298,19 +298,19 @@ flowchart TD
style T fill:#D5E8D4,stroke:#82B366
style U fill:#FFFFFF,stroke:#000000
style V fill:#FFF2CC,stroke:#D6B656
click C href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onBeforeLinkScales(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeLinkScales" _blank
click E href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onAfterLinkScales(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterLinkScales" _blank
click H href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onBeforeParse(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,int,int)" "onBeforeParse" _blank
click O href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onBeforeUpdate(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,org.pepstock.charba.client.options.TransitionMode)" "onBeforeUpdate" _blank
click L href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onAfterParse(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,int,int)" "onAfterParse" _blank
click Q href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onAfterUpdate(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,org.pepstock.charba.client.options.TransitionMode)" "onAfterUpdate" _blank
click R href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onBeforeDraw(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeDraw" _blank
click T href "https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/Controller.html#onAfterDraw(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterDraw" _blank
click C href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onBeforeLinkScales(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeLinkScales" _blank
click E href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onAfterLinkScales(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterLinkScales" _blank
click H href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onBeforeParse(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,int,int)" "onBeforeParse" _blank
click O href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onBeforeUpdate(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,org.pepstock.charba.client.options.TransitionMode)" "onBeforeUpdate" _blank
click L href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onAfterParse(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,int,int)" "onAfterParse" _blank
click Q href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onAfterUpdate(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart,org.pepstock.charba.client.options.TransitionMode)" "onAfterUpdate" _blank
click R href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onBeforeDraw(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onBeforeDraw" _blank
click T href "https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/Controller.html#onAfterDraw(org.pepstock.charba.client.controllers.ControllerContext,org.pepstock.charba.client.IsChart)" "onAfterDraw" _blank
```

### Implementing a controller

The easy way to implement a controller is to extends the [AbstractController](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/controllers/AbstractController.html) class and pass the controller type by the constructor.
The easy way to implement a controller is to extends the [AbstractController](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/controllers/AbstractController.html) class and pass the controller type by the constructor.

```java
// new controller
Expand Down
14 changes: 7 additions & 7 deletions docs/DateAdapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To see all available formats, have a look [here](https://moment.github.io/luxon/

[Luxon](https://moment.github.io/luxon/) can be configured in order to update some behavior during parsing, formatting and date management.

The [Luxon options](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/adapters/DateAdapterOptions.html) can be used as following:
The [Luxon options](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/adapters/DateAdapterOptions.html) can be used as following:

```java
// creates a time series axis
Expand All @@ -52,18 +52,18 @@ The following are the attributes that you can set:

| Name | Type | Default | Description
| :- | :- | :- | :-
| locale | [CLocale](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/intl/CLocale.html) | `null` | Using locale specifying the language to use generating or interpreting strings.
| zone | [TimeZone](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/intl/enums/TimeZone.html) | `null` | Implementation recognizes the time zone names of the IANA time zone database.
| outputCalendar | [Calendar](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/intl/enums/Calendar.html) | `null` | The calendar type to use.
| numberingSystem | [NumberingSystem](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/intl/enums/NumberingSystem.html) | `null` | The numbering system to use.
| locale | [CLocale](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/intl/CLocale.html) | `null` | Using locale specifying the language to use generating or interpreting strings.
| zone | [TimeZone](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/intl/enums/TimeZone.html) | `null` | Implementation recognizes the time zone names of the IANA time zone database.
| outputCalendar | [Calendar](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/intl/enums/Calendar.html) | `null` | The calendar type to use.
| numberingSystem | [NumberingSystem](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/intl/enums/NumberingSystem.html) | `null` | The numbering system to use.

For more details, have a look how to configure [time axes adapters](./axes/CartesianTimeAxes#adapters) and the [INTL locale](./intl/Locale) documentation.

## Using the date adapter

**Charba** enables the possibility to get a [date adapter](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/adapters/DateAdapter.html) instance from [Chart.JS](http://www.chartjs.org/) which can provides some capabilities, like formatting, parsing and date operations.
**Charba** enables the possibility to get a [date adapter](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/adapters/DateAdapter.html) instance from [Chart.JS](http://www.chartjs.org/) which can provides some capabilities, like formatting, parsing and date operations.

Here is an example how to use a [date adapter](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/adapters/DateAdapter.html) to format ticks by callback:
Here is an example how to use a [date adapter](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/adapters/DateAdapter.html) to format ticks by callback:

```java
// creates a time axis
Expand Down
2 changes: 1 addition & 1 deletion docs/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ As of version **3**, **Charba** has got an own DOM tree manager which allows to
* Tick callback to define the amount of decimals digits of the axis number values when all datasets are hidden
* Legend callback to avoid to hide all datasets
* Datalabels listeners callback to change cursor hovering the labels
* Datalabels listeners callback to select the labels, leveraging on [DatasetSelectionEventHandler](https://pepstock-org.github.io/Charba/6.4/org/pepstock/charba/client/events/DatasetSelectionEventHandler.html)
* Datalabels listeners callback to select the labels, leveraging on [DatasetSelectionEventHandler](https://pepstock-org.github.io/Charba/6.5/org/pepstock/charba/client/events/DatasetSelectionEventHandler.html)
* Datalabels formatter callback to return the percentage as value to show in the chart

Loading

0 comments on commit f2e428c

Please sign in to comment.