go-tachart icon indicating copy to clipboard operation
go-tachart copied to clipboard

How to add multiple charts to single page?

Open petric3 opened this issue 3 years ago • 2 comments

I just discovered your package. So far have been using go-echarts/v1, where one can easily add multiple charts to single page, e.g.:

page := charts.NewPage()

line1 := charts.NewLine()
page.Add(line1)
line2 := charts.NewLine()
page.Add(line2)
line3 := charts.NewLine()
page.Add(line3)

I was trying to get similar multip-charts per page with your package but no success. Please how can I achieve sth like this, where one page contains multiple charts: image

Thank you and thank you for the great package, hopefully we see it expand even more.

petric3 avatar Nov 05 '21 09:11 petric3

This is currently not supported since the interface does NOT take any custom charts as parameters. I imagine you can easily tweak it a little bit to achieve what you want. Check out the code at https://github.com/iamjinlei/go-tachart/blob/master/tachart/tachart.go#L457 where it essentially builds a go-echarts "chart" object. You can try to blend that chart with your custom charts. Let me know what you find out :)

iamjinlei avatar Nov 07 '21 11:11 iamjinlei

Thank you for the answer. Hmnnn been looking into the code for some time now, wish i could contribute, but no clue really how to approach it... new to Go here, migrating from Python, and far from IT and Dev guy :( If you find time pls.., that would be much appreciated.

petric3 avatar Nov 07 '21 18:11 petric3