score:3
Accepted answer
Here's where I am, only the bubbleLegend (in comments #) doesn't work (it is displayed 3 times on the map)
mydf <- data.frame(
lat = c(-7.1871, 36.95733, 17.9356, -20.4379, 30.2496, -54.9593,
18.0365, 17.9688, 18, 18.005, 17.9538),
lon = c(129.3989, -121.576, -66.6961, -68.773, 138.6162, -128.3548,
-66.8143, -66.9705, -66.7603, -66.7765, -66.8265),
z = c(4.5, 2.77, 4.1, 5.2, 4.5, 5.1, 2.52, 3.7, 2.68, 2.71, 2.88),
part = c(10,15,8,20,30,12,5,17,21,9,11)
)
mydf <- mydf %>%
mutate(color = case_when(
part < 10 ~ "red",
part < 20 ~ "green",
TRUE ~ "blue"
))
hcmap() %>%
hc_add_series(data = mydf, type = "mapbubble", name = "EarthQuake", maxSize = '12%') %>%
hc_tooltip(useHTML = T,headerFormat='',pointFormat = paste('Location :{point.place}<br> Part: {point.part} <br> Magnitude : {point.z}')) %>%
hc_legend(enabled = TRUE,
title = list(text = "Mon titre"),
# bubbleLegend = list(
# enabled = TRUE,
# borderColor = '#000000',
# borderWidth = 3,
# color = '#8bbc21',
# connectorColor = '#000000'
# ),
align = "bottom", layout = "horizontal",
floating = TRUE ,valueDecimals = 0,
symbolHeight = 11, symbolWidth = 11, symbolRadius = 0) %>%
hc_colorAxis(
dataClasses = color_classes(breaks = c(0, 10, 20, 100),
colors = c("red","green","blue")
)) %>%
hc_title(text = "Global Seismic Activity") %>%
hc_mapNavigation(enabled = T)%>%
hc_exporting(enabled = TRUE)
score:0
Source: stackoverflow.com
Related Query
- Customize bubble map with highcharter
- Highcharter Map with Categorical Variables in R
- How to draw a bubble map with longitude and latitude using Highcharts in react
- Customize colors for boxplot with highcharter
- R Highcharter map with hc_motion
- Creating a bubble map from custom GeoJson with Highcharts / Highmaps
- highcharts map bubble with categorized classes
- Highcharter plotBands, plotLines with time series data
- Highcharts - Global configuration with common code and unique data & Headings
- How to build an Organization Chart with highcharter
- highcharter hcaes "group" usage while plotting large amounts of data with highchart2()
- Drilldown United states city/county map from states using highcharter
- R Highcharter Issues with adding plotBands on y-axis where hc_yAxis_multiples used
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- R Highcharter map from customized shapefile
- Heat Map With Red Color Range For Negative Values And Green Color Range For Positive Values
- create bubble chart (Highcharts) with rCharts package
- highchart treemap in R with more then 2 drilldowns makes a incorrectly nested map
- Highcharts can't render a bubble chart with a single series
- HighCharts and Map Bubble are not compatible
- Highcharts - bubble chart with titles at x- and y-Axis - Error #14
- Combine scatter and line charts with highcharter in R
- Drawing Bubble Chart by using npm highcharts with error #17
- passing formatting JavaScript code to HighCharts with JSON
- Bubble chart with NextJS and highcharts-react-official
- highcharter graph with 2 groups in r
- JSON Data Map Issue with HighCharts + Ajax
- Highcharts fill map based on data values with React TypeScript
- Highcharts Map with React TypeScript
- Error in R with highcharter library
More Query from same tag
- Control HighCharts export options
- Highcharts: Disabling/Enabling enableMouseTracking after initial render
- How to fill area between two serieses in Hightcharts?
- High chart on click event listening
- How to populate a Highcharts axis with string formatted data from a PHP array
- Adding area gradient to line highchart
- HighCharts doesnt get data from Flask endpoint
- How to capture the hover event in highcharts labels?
- Adding a label to the left and to the right of a bar in highcharts
- Highcharts with Rails 6
- Highchart event LOAD is not working
- How to show legend like Maps' in Line diagram in Highcharts?
- Drawing a small vertical line on top of chart using High charts by specifying end coordinates
- highcharts changing dial value interactive with mouse events
- How to hide one series data info in tooltip using highcharts
- How can I make a chart through JSONfile from highchats? please help me
- Highcharts load date values in X axis
- Multipane on Highstock
- Random number on Highcharts + AngularJS
- High Charts Can't hide Pie Chart data labels
- How to add rotation event to an ember highchart graph?
- Highcharts: Rotate VU dials
- DOM Node count increase when loading Highcharts documents (Chrome)
- Highcharts columnrange date chart
- Highstock: set xAxis as not "datetime"
- Highlight one bar in a series in highcharts?
- Get Id after addpoint in highchart
- Highstock, error: Uncaught TypeError: w[(intermediate value)(intermediate value)(intermediate value)] is not a constructor
- Disable-Click on Legend in HighCharts Column Graph
- How to change the marker style on hover in HighCharts