Last active
February 19, 2022 18:08
-
-
Save helgasoft/63f1b16d9632bfdb6f21f2db80910f47 to your computer and use it in GitHub Desktop.
R | ECharts | logo, title and background, CORS issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(echarty) | |
radial_gradient <- htmlwidgets::JS( | |
"new echarts.graphic.RadialGradient(0.3, 0.3, 0.8)" | |
# ,[{ offset: 0, color: 'red'}, { offset: 1, color: 'red'}])" | |
) | |
color_stops <- htmlwidgets::JS( | |
"[{ offset: 0, color:'gold' }, // color at 0% | |
{ offset: 0.5, color:'MediumSlateBlue' }, // color at 50% | |
{ offset: 1, color:'skyblue' // color at 100% | |
}]" | |
) | |
ec.init(title=list( | |
text='{a| } {b|🢀 here is the logo}', | |
textStyle = list( | |
rich=list( | |
a= list(height=30, backgroundColor=list( | |
image='http://simpleicon.com/wp-content/uploads/glass-64x64.png')), | |
b= list( color='teal', fontSize= 24, fontWeight= 400)) | |
) ), | |
backgroundColor = list(type = "radial", | |
x = 0.5, y = 0.5, r = 0.5, | |
backgroundColor = radial_gradient, | |
colorStops = color_stops ) | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good news! Thanks a lot!