What problem does this feature solve?
i want to set loading custom indicator do not use default setting. default support
default: {
text: 'loading',
color: '#c23531',
textColor: '#000',
maskColor: 'rgba(255, 255, 255, 0.8)',
zlevel: 0,
fontSize: 12,
showSpinner: true,
spinnerRadius: 10,
lineWidth: 5,
fontWeight: 'normal',
fontStyle: 'normal',
fontFamily: 'sans-serif'
}
echart version 5.2.2
but not support set custom indicator i want to use css background-url
What does the proposed API look like?
myChart.showLoading({
text: "",
backgroundColor: "red",
backgroundImage: "url(xxxx.png)",
backgroundSize: "50px",
});
1条答案
按热度按时间sgtfey8w1#
There is an API
echarts.registerLoading
to support registering a custom loading component. But it's not documented yet. If you want, you can refer to the source code of the default loading and try to implement your requirement.BTW, why not use HTML + CSS to get a custom loading indicator, which is quite easy and highly customizable?