Comments (4)
Reinstall the package.
devtools::install_github("JohnCoene/ehcarts4r")
You can now pass additional options to ...
, see official documentation for a full list. FYI that is true for all other echarts4r
functions 👍
USArrests %>%
e_charts(UrbanPop) %>%
e_line(Assault) %>%
e_area(Murder, y.index = 1, x.index = 1) %>%
e_toolbox(feature = "saveAsImage", title = "Save As Image")
Note e_datazoom
is a convenience function so if you want to rename the title for that you will have to go first initialise the toolbox with the dataZoom
feature, then use e_datazoom
(same for e_brush
):
USArrests %>%
e_charts(UrbanPop) %>%
e_line(Assault) %>%
e_area(Murder, y.index = 1, x.index = 1) %>%
e_y_axis(gridIndex = 1) %>%
e_x_axis(gridIndex = 1) %>%
e_grid(height = "35%") %>%
e_grid(height = "35%", top = "50%") %>%
e_toolbox("dataZoom", title = list(zoom = "zoom", back = "back")) %>%
e_datazoom()
Close if it works, tell you if you get an error.
from echarts4r.
You were doing it right, my functions were not... I couldn't find a way of fixing this without breaking the toolbox as it currently is.
Reinstall
devtools::install_github("JohnCoene/echarts4r")
Now toolbox is split into two functions.
e_toolbox
- general toolbox optionse_toolbox_feature
- feature specific options
To do what you want:
USArrests %>%
e_charts(UrbanPop) %>%
e_line(Assault) %>%
e_area(Murder, y.index = 1, x.index = 1) %>%
e_toolbox(right = "10%") %>%
e_toolbox_feature(feature = "saveAsImage", title = "Save As Image")
Note that you can still use e_toolbox_feature
directly if you do not want to pass additional options.
USArrests %>%
e_charts(UrbanPop) %>%
e_line(Assault) %>%
e_area(Murder, y.index = 1, x.index = 1) %>%
e_toolbox_feature(feature = "saveAsImage")
Sorry if this broke some of your functions (replace e_toolbox
to e_toolbox_feature
)
from echarts4r.
That's great - the spliting makes totally sense imo. It adds flexibility in customizing the toolbox as a whole as well as its single components. Thanks a lot. Really appreciate your efforts!!
from echarts4r.
Thanks a lot! I get no error and it accepts the custom title. However the title gets cut ("Save As Im...") as the toolbox element is placed next to the container / canvas border. I've tried adjusting the position of the entire toolbox by passing the right='20%'
as well as moving the position / allignment of the text with the textPosition
/ textAlign
option. Is this supposed to work?
I found a way that solved the problem for me in my specific case by putting a dataview element next to it. However if there is / can be a way to move the toolbox or the text OR the there would be more space for the title by default, that would be even better.
USArrests %>%
e_charts(UrbanPop) %>%
e_line(Assault) %>%
e_area(Murder, y.index = 1, x.index = 1) %>%
e_toolbox(feature = "saveAsImage", title = "Save As Image") %>%
e_toolbox(feature = "dataView",title="Data",lang="")
from echarts4r.
Related Issues (20)
- timeline with multiple-y-axis setting y axis doesn't work
- timeline with multiple-y-axis setting y axis doesn't work
- e_bar chart combine with e_pie chart HOT 3
- Formatter with ec.clmn HOT 1
- e_river HOT 2
- Race and Waterfalls Charts HOT 6
- 'Cannot find function renderEcharts4r' error in Shiny Quarto document HOT 1
- Problem chaining e_text_g for multiple text placement HOT 2
- Question on shared dataset charts HOT 4
- `e_showtip_p`/ `e_dispatch_action_p` not working in modularized shiny app, attempting to debug with local fork but `debugger` doesn't register in the `addCustomMessageHandler` HOT 2
- How can I change the height and width of the elements (rectangles) on the heat map? HOT 3
- Themes from theme builder needs editing
- Make echarts4r available for webR HOT 1
- [Bug] on example code of Histogram HOT 1
- How to give each grid its own axis maximum? HOT 1
- e_radar not supporting group_by? HOT 1
- Scoring ring HOT 4
- Formatting dataView HOT 2
- margin not working when there are multiple groups of series HOT 10
- leaflet broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echarts4r.