-
Notifications
You must be signed in to change notification settings - Fork 15
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
你好,我是个echart的初学者,想问个问题 #1
Comments
你好,你这样的写法其实不适合用我的框架。正确的写法:
} public class ECharts { |
非常感谢回复,受教了,是我把你的这个框架还没有完全理解,下来再好好对照echart的api学学,再次感谢! |
不用客气 |
假如我现在要使用timeline组件,要实现官网的下面data数组,[
'2002-01-01',
'2003-01-01',
'2004-01-01',
{
value: '2005-01-01',
tooltip: { // 让鼠标悬浮到此项时能够显示
tooltip
。formatter: '{b} xxxx'
},
symbol: 'diamond', // 此项的图形的特别设置。
symbolSize: 16 // 此项的图形大小的特别设置。
},
'2006-01-01'
]
我现在的写法是,
TimeLineCharts charts=new TimeLineCharts();
Map<String, Object> map=new HashMap<String,Object>();
Map<String, Object> mtool=new HashMap<>();
mtool.put("formatter", "what");
map.put("value", "2005-01-01");
map.put("tooltip", mtool);
map.put("symbol", "diamond");
map.put("symbolSize", 16);
charts.setData(new Object[]{"2002-01-01","2003-01-01","2004-01-01",map,"2006-01-01"});
Object json=EChartsAnnotationProcessor.phraseSingleChart(charts);
System.out.print(JSON.toJSONString(json));
请问我这种写法对么?还是有其它更简洁的写法,还有echarts3中说把公共的组建都放到baseOptions里,这个,我怎么能把我的这个timeline放到options里面,生成json字符串到时候,我把baseOption 并在生成好的字符串中?谢谢了
The text was updated successfully, but these errors were encountered: