Questions tagged [echarts4r]

Use this tag for questions related to the usage of the [echarts4r] package, which provides functions to facilitate making interactive charts in the R programming language, by leveraging the Echarts JavaScript library.

The package provides functions to make it easy to create interactive charts in the R programming language by leveraging the Javascript library which includes 36 chart types, themes, proxies and animations.

An overview and introduction to the package can be found on the package website.

105 questions
0
votes
1 answer

How to change the min/max values for the visual map in echarts4r

According to this, I thought I could change the max value shown in the visual map like so: e_visual_map(value, max = 100) But this seems to have no effect. Here is a full example: library(echarts4r) # Sample data df <- data.frame( category =…
Giovanni Colitti
  • 1,982
  • 11
  • 24
0
votes
0 answers

R Shiny echarts4r Map Zoom

I'm able to load up successfully R Shiny map using echarts4r library. I'm looking to add a simple zoom for users to zoom in and out. I have added function to zoom, and it shows up on the Map (in the upper right hand corner), but when I attempt to…
jKraut
  • 2,325
  • 6
  • 35
  • 48
0
votes
1 answer

show Label as percentage in echarts4r

df1 <- data.frame(Date = c(1,2,3), Reach = c(12,15,20), Cost = c(0.98,0.00056,0.89)) df1 %>% e_chart(Date) %>% e_bar(Reach, label = list(show = FALSE)) %>% e_line(Cost, y_index = 1, label = list(show =…
0
votes
1 answer

hide e_line labels in echarts4r

df1 <- data.frame(Date = c(1,2,3), Reach = c(12,15,20), Cost = c(12332,321112,4231223)) df1 %>% e_chart(Date) %>% e_bar(Reach, emphasis = list(label = list(show = FALSE))) %>% e_line(Cost, y_index = 1)…
0
votes
1 answer

echarts4r e_line color by categorical variable

I want to make this kind of graph (here from Our World In data ) but where the line colour varies by categorical variable. Since the calculated threshold is seasonal, I would need to use a categorical variable (see the Alert variable). Based on…
user3355655
  • 463
  • 3
  • 15
0
votes
1 answer

echarts4r: horizontal jitter with discrete x axis

In an echarts4r scatter plot, is it possible to add horizontal jitter with a discrete x axis? library(echarts4r) library(tidyverse) df <- tibble(x = c("a", "a", "b", "b", "c", "c"), y = c(1, 2, 3, 3, 4, 5), z = c(1, 2, 3, 3, 4,…
Dennis
  • 23
  • 5
0
votes
1 answer

eCharts4r - Axis ticks/text fontSize

Is it possible to alter the font size of the y- and x-axis ticks? I have looked through the documentation and can't find anything that works. reprex: library(lubridate) library(echarts4r) df <- data.frame( Date =…
obrunt
  • 125
  • 7
0
votes
2 answers

How to add margins around echarts4r plots to fit axis names?

I am trying to make a plot using echarts4r and when I add axis labels they are either too close or outside of the plot when padding is added. This issue also occurs when I try to add the plot to a quarto revealjs presentation. Is it possible to…
Shubham
  • 220
  • 2
  • 10
0
votes
1 answer

echarts4r use valueFormatter in tooltip

I want to use the valueFormatter option in an echarts4r tooltip. Following the documentation of e_tooltip I should be able to use the ... args as they are passed to echarts. For example I would expect this to…
David
  • 9,216
  • 4
  • 45
  • 78
0
votes
0 answers

Is there an easy way to transform data.tree Node objects in a format suitable for echarts4r functions?

According to echarts4r::e_sunburst help page you can use either "json list hierarchical data representation" which seem to be simply a list or a "tibble hierarchical data representation". The data.tree::ToListExplicit function seems to be able to…
Gilles San Martin
  • 4,224
  • 1
  • 18
  • 31
0
votes
1 answer

echarts4r : how to map a third continuous variable to a custom color scale (without changing the points size)

In the following reproducible example I would like to map the year value to a continuous color scale (with all the points with a manually selected and fixed size). The points are not of the expected color... library(echarts4r) d <- data.frame( …
Gilles San Martin
  • 4,224
  • 1
  • 18
  • 31
0
votes
0 answers

Echarts4rBox : How to map additional parameters

I'm using echarts4Box component in a shiny dashboard. I'm unable to design the box with x / y axis value. Could some one give an example how to do it. output$boxp1 <- renderEcharts4rBox({ echarts4rBox(dataProd %>% …
0
votes
1 answer

How to use "itemStyle" for multiple series on echarts4r?

Hello and thanks for reading me. Im trying to create a plot with conditional colors and I want to have the same colors for the scatter serie, but im just getting the custom color for the first serie. How I can apply the custom color for both…
0
votes
1 answer

Use two different y-axis names with e_grid()

I want to have two different y-axis labels for two separate y-axes using echarts4r::e_grid(). Here is the sample data taken from the example here: df <- data.frame( x = 1:20, w = runif(20, 1, 100), z = runif(20, 25, 75) ) Adding name = "w"…
Giovanni Colitti
  • 1,982
  • 11
  • 24
0
votes
1 answer

Custom Legend Order in Echarts4r

Working with echarts4r and attempting to get a custom order in my scatter plot. Echarts4r appears to ALWAYS sort these categories alphabetically. I even tried e_charts(x, reorder = FALSE) %>% per this post. Looking for help to custom order…
jKraut
  • 2,325
  • 6
  • 35
  • 48