-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
bugSomething isn't workingSomething isn't working
Description
trying to get echarts working with dflib: https://github.com/jupyter-java/jupyter-java-examples/blob/main/notebooks/java-dflib-echarts.ipynb
import org.dflib.echarts.*;
DataFrame df = DataFrame.foldByRow("name", "salary").of(
"J. Cosin", 120000,
"J. Walewski", 80000,
"J. O'Hara", 95000)
.sort($col("salary").desc());
var chart = ECharts
.chart()
.xAxis("name")
.series(SeriesOpts.ofBar(), "salary")
.plot(df);
chart;
See that it does generates a html/text output cell with:
<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js'></script>
<div id='dfl_ech_98' style='width: 600px;height:400px;'></div>
<script type='text/javascript'>
var chart_dfl_ech_98 = echarts.init(
document.getElementById('dfl_ech_98'),
null,
);
var option_dfl_ech_98 = {
dataset: {
source: [
['L0','J. Cosin','J. O\'Hara','J. Walewski'],
['salary',120000,95000,80000]
]
},
xAxis: [
{
type: 'category'
},
],
yAxis: [
{
type: 'value'
},
],
series: [
{
name: 'salary',
encode: {
x: 0,
y: 1,
},
seriesLayoutBy: 'row',
type: 'bar'
},
]
};
option_dfl_ech_98 && chart_dfl_ech_98.setOption(option_dfl_ech_98);</script>
but i cant get that to render in vscode jupyter notebook nor in github notebook preview.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working