You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
do something javascript do ( render charts)
let content = r#"
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
var app = {};
Uncaught ReferenceError: echarts is not defined
at :1:13
at RawInterpreter.appendChildren (inline0.js:2:2722)
at RawInterpreter.run (inline0.js:140:185)
at echarts.js:589:25
at logError (echarts.js:259:18)
at imports.wbg.__wbg_run_2ca7d9c27d6a5eb6 (echarts.js:588:66)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_interpreter_js::unified_bindings::RawInterpreter::run::h35bd3fd8a60a938f (echarts_bg.wasm:0x274bd0)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_interpreter_js::unified_bindings::Interpreter::flush::hb242561480756bf4 (echarts_bg.wasm:0x48d2b)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_web::mutations::::flush_edits::he3ef49ea831345c6 (echarts_bg.wasm:0x28c141)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_web::run::{{closure}}::haa3602bc144273cb (echarts_bg.wasm:0x17d69)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, everyone
I'm new with dioxus.
I want to create a simple page, render some charts using apache-echarts.
import js file using
script { src = "https://registry.npmmirror.com/echarts/5.5.0/files/dist/echarts.min.js" },it's ok.
do something javascript do ( render charts)
let content = r#"
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
var app = {};
var option;
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line'
}
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
"#;
script { dangerous_inner_html: "{content}" }
but I got error on console:
Uncaught ReferenceError: echarts is not defined
at :1:13
at RawInterpreter.appendChildren (inline0.js:2:2722)
at RawInterpreter.run (inline0.js:140:185)
at echarts.js:589:25
at logError (echarts.js:259:18)
at imports.wbg.__wbg_run_2ca7d9c27d6a5eb6 (echarts.js:588:66)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_interpreter_js::unified_bindings::RawInterpreter::run::h35bd3fd8a60a938f (echarts_bg.wasm:0x274bd0)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_interpreter_js::unified_bindings::Interpreter::flush::hb242561480756bf4 (echarts_bg.wasm:0x48d2b)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_web::mutations::::flush_edits::he3ef49ea831345c6 (echarts_bg.wasm:0x28c141)
at echarts-b5b50ed3d56e96e1.wasm.dioxus_web::run::{{closure}}::haa3602bc144273cb (echarts_bg.wasm:0x17d69)
Need some help! Thank you.
Beta Was this translation helpful? Give feedback.
All reactions