Skip to content

Commit

Permalink
update(vignettes): fix #221 offical documents links
Browse files Browse the repository at this point in the history
  • Loading branch information
swsoyee committed Oct 23, 2020
1 parent 3504d8d commit b673a34
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions vignettes/advanced.Rmd
Expand Up @@ -330,11 +330,11 @@ USArrests %>%

## Nested data

You might observe in the official documentation that some series can take more _data_ points than just x and y points, like [e_bar](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data); In the [official documentation](https://ecomfe.github.io/echarts-doc/public/en/option.html) go to "serie", select the one you are interested in (i.e.: bar) then select "data".
You might observe in the official documentation that some series can take more _data_ points than just x and y points, like [e_bar](https://echarts.apache.org/en/option.html#series-line.data); In the [official documentation](https://echarts.apache.org/en/option.html) go to "serie", select the one you are interested in (i.e.: bar) then select "data".

`e_bar` lets you pass `serie` (from your initial data.frame) which corresponds to `value` in the [original library](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data). However the latter also takes, `label`, `itemStyle`, and `tooltip` but being JSON arrays they translate to lists in R and dealing with nested data.frames is not ideal. `e_add` remedies to that. It allows adding those nested data points.
`e_bar` lets you pass `serie` (from your initial data.frame) which corresponds to `value` in the [original library](https://echarts.apache.org/en/option.html#series-bar.data). However the latter also takes, `label`, `itemStyle`, and `tooltip` but being JSON arrays they translate to lists in R and dealing with nested data.frames is not ideal. `e_add` remedies to that. It allows adding those nested data points.

Let's add some columns to the `iris` dataset which we will use in `e_add` to customize the appearance of the [`label`](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label).
Let's add some columns to the `iris` dataset which we will use in `e_add` to customize the appearance of the [`label`](https://echarts.apache.org/en/option.html#series-bar.data.label).

```{r}
# add columns to iris
Expand Down
10 changes: 5 additions & 5 deletions vignettes/get_started.Rmd
Expand Up @@ -112,7 +112,7 @@ df %>%
e_legend(right = 0) # move legend to the bottom
```

Add a tooltip, of which there are numerous [options](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip), here we use `trigger = "axis"` to trigger the tooltip by the axis rather than a single data point.
Add a tooltip, of which there are numerous [options](https://echarts.apache.org/en/option.html#tooltip), here we use `trigger = "axis"` to trigger the tooltip by the axis rather than a single data point.

```{r}
df %>%
Expand Down Expand Up @@ -144,20 +144,20 @@ df %>%

## Navigate options

`echarts4r` is highly customisable, there are too many options to have them all hard-coded in the package but rest assured; they are available, and can be passe to `...`. You will find all these options in the [official documentation](https://ecomfe.github.io/echarts-doc/public/en/option.html).
`echarts4r` is highly customisable, there are too many options to have them all hard-coded in the package but rest assured; they are available, and can be passe to `...`. You will find all these options in the [official documentation](https://echarts.apache.org/en/option.html).

<a href="https://ecomfe.github.io/echarts-doc/public/en/option.html" class="btn btn-default" target="_blank">
<a href="https://echarts.apache.org/en/option.html" class="btn btn-default" target="_blank">
<i class="fa fa-book"></i>
Official Documentation
</a>

For instance the documentation for the tooltip looks like this:

<a href="https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip" target="_blank">
<a href="https://echarts.apache.org/en/option.html#tooltip" target="_blank">
<img src="https://echarts4r.john-coene.com/articles/docs.png" class="img-responsive responsive-img" />
</a>

Therefore if we want to change our tooltip to an [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.axisPointer) we can do so by passing a list to `axisPointer`.
Therefore if we want to change our tooltip to an [axisPointer](https://echarts.apache.org/en/option.html#tooltip.axisPointer) we can do so by passing a list to `axisPointer`.

```{r}
df %>%
Expand Down
2 changes: 1 addition & 1 deletion vignettes/grid.Rmd
Expand Up @@ -25,7 +25,7 @@ e_common(

## Axis helper

You can customise the axis with `e_axis`, `e_x_axis` or `e_y_axis`, you can see the [official documentation](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) for more details. There is also a helper function, `e_format_axis` and its sisters `e_format_x_axis` and `e_format_y_axis`. The latter lets you easily add suffix or prefix to your axis labels.
You can customise the axis with `e_axis`, `e_x_axis` or `e_y_axis`, you can see the [official documentation](https://echarts.apache.org/en/option.html#xAxis) for more details. There is also a helper function, `e_format_axis` and its sisters `e_format_x_axis` and `e_format_y_axis`. The latter lets you easily add suffix or prefix to your axis labels.

Say you want to plot against ceslius.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/mark.Rmd
Expand Up @@ -28,7 +28,7 @@ You can mark points, lines and areas on your chart to emphasise certain things.

## Type

You mark things by passing a `list` to the `data` argument, this list can be of many different format, see the [official documentation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data).
You mark things by passing a `list` to the `data` argument, this list can be of many different format, see the [official documentation](https://echarts.apache.org/en/option.html#series-line.markPoint.data).

One of the format is to pass a `type`:

Expand Down
2 changes: 1 addition & 1 deletion vignettes/timeline.Rmd
Expand Up @@ -152,7 +152,7 @@ df %>%

## Time step options

The function `e_timeline_opts` is used to set general options on the timeline, i.e.: auto-play like above. The full list of options is on the [official website](https://ecomfe.github.io/echarts-doc/public/en/option.html#timeline).
The function `e_timeline_opts` is used to set general options on the timeline, i.e.: auto-play like above. The full list of options is on the [official website](https://echarts.apache.org/en/option.html#timeline).

However, we can also set options specific to each timestep with `e_timeline_serie`. The arguments to this function differ quite a bit from the rest of the package. As we have to assign options to multiple timesteps at once we need to pass vectors or lists of options, the length of the timesteps.

Expand Down
2 changes: 1 addition & 1 deletion vignettes/toolbox.Rmd
Expand Up @@ -55,4 +55,4 @@ echart %>% e_toolbox_feature(feature = "dataZoom")
echart %>% e_toolbox_feature(feature = "dataView")
```

See the [official documentation](https://ecomfe.github.io/echarts-doc/public/en/option.html#toolbox.feature) for the full list.
See the [official documentation](https://echarts.apache.org/en/option.html#toolbox.feature) for the full list.

0 comments on commit b673a34

Please sign in to comment.