gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.8k stars 264 forks source link

Can not work with go-chart #197

Closed naiba closed 4 years ago

naiba commented 4 years ago
import (
    "bytes"
    "github.com/wcharczuk/go-chart" //exposes "chart"
)

graph := chart.Chart{
    Series: []chart.Series{
        chart.ContinuousSeries{
            XValues: []float64{1.0, 2.0, 3.0, 4.0},
            YValues: []float64{1.0, 2.0, 3.0, 4.0},
        },
    },
}

buffer := bytes.NewBuffer([]byte{})
graph.Render(chart.PNG, buffer)
display.PNG(buffer.Bytes())
naiba commented 4 years ago

The error is: reflect: Call using *chart.Chart as type chart.Chart

naiba commented 4 years ago

Any body here?

cosmos72 commented 4 years ago

I cannot reproduce the problem - it works for me, see attached screenshot gophernotes_issue_197

Which version of Go compiler and gophernotes are you using, and on what OS?

naiba commented 4 years ago

@cosmos72 Thanks for your replay, I use docker.

docker run -it -p 8888:8888 gopherdata/gophernotes:latest-ds