![]() Step 9: Add an Additional Observer to Go Back from the Drillĭrill-down functionality allows users to navigate through hierarchical data, starting with the highest level of data (in this case, continents) and then successively exploring lower levels of data (countries, and cities).Step 8: Dynamically Modify the Bar Chart’s level on Bar Click.Step 7: Modify the Bar Chart on Bar Click.Step 5: Moving an eChart into a Shiny App.Step 4: Plot the Drill Down with ‘plot_sales_data’.Step 3: Move Chart Creation Logic to a Function.Step 2: Create Bar Chart with echarts4r.Step 0: Install and Load the Required Libraries.Important note: This drill-down approach shouldn’t be applied if you want to compare inner-level data across large-level data (in other words, if you want to compare countries between continents). What if we could start with a chart at the top level (for example, sales by continent) and then allow the user to drill down to the level of their choice? Sometimes, providing a lot of inputs doesn’t make for a really good user experience. If you are working on a Shiny Application, you could allow the user to select data using different inputs (for example, you can define one `selectInput` per level) and chart selected data.If you are creating a static document, you could have one chart per level, showing all elements of a level at the same time.This kind of data can be represented in different ways depending on what you want to communicate: For example, you might have recorded sales data at a city level, which can be grouped at a country level, which can then be grouped into a larger level (such as a continent). Why drill-down? Well, sometimes, data can be grouped into different levels. We’ll do this in a Shiny app, as a way to demonstrate the functionality of interactive data. In this article, I’ll show you how to implement drill-down using the echarts4r package, set and observe custom inputs, and use e_on() observers. ![]() Selecting the right graphical representation of your data can enhance your data storytelling. Data visualization is important for communicating results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |