-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool tip of K plot #7
Comments
It should be There are two additional problems in your data structure:
So please be more careful when you apply ECharts examples to your own data :) library(recharts)
test=rbind( c(2320.26,2302.6,2287.3,2362.94),
c(2300,2291.3,2288.26,2308.38),
c(2295.35,2346.5,2295.35,2346.92),
c(2347.22,2358.98,2337.35,2363.8))
K1 = list(
title = list(
text = 'test',
subtext = 'From d3.js',
x = 'right',
y = 'bottom'
),
tooltip = list(
trigger = 'axis',
formatter = JS("function (params) {
var res = params[0].seriesName + ' ' + params[0].name;
res += 'open : ' + params[0].value[0] + ' high : ' + params[0].value[3];
res += ' close : ' + params[0].value[1] + ' low : ' + params[0].value[2];
return res;
}")
),
toolbox = list(
show = TRUE,
feature = list(
restore = list(show = TRUE),
saveAsImage = list(show = TRUE)
)
),
dataZoom =list(
show =TRUE,
realtime=TRUE,
start = 50,
end = 100
),
xAxis=list(
type = 'category',
boundaryGap = TRUE,
axisTick=list( onGap=FALSE),
splitLine=list(show=FALSE),
data =c(
"2013/1/24", "2013/1/25", "2013/1/28", "2013/1/29"
)
),
yAxis =list(
type='value',
scale=TRUE,
boundaryGap=c(0.01, 0.01)
),
series = list(
list(
type = 'k',
name = 'A NAME HERE',
data = test
)))
echart(K1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Yihui,
I'm trying to create K plot, but I can't let tool tip popup correctly. I think it's something wrong with JavaScript. Can you help me fix it up?
The text was updated successfully, but these errors were encountered: