asciidoctor / asciidoctor-chart

A set of Asciidoctor extensions that add a chart block and block macro to AsciiDoc for including charts in your AsciiDoc document.
Other
29 stars 13 forks source link

adding tittle to chart #5

Closed xu4wang closed 2 years ago

xu4wang commented 4 years ago

I am trying to add tittle to chart:

.Chart 1
chart::sample.csv[line,engine="chartjs"]

.Chart 2
chart::sample.csv[bar,600,300,engine="chartist"]

.Chart 3
chart::sample.csv[height=200,width=500]

.Chart 4
chart::sample.csv[spline,500,400]

.Chart 5
[chart,line]
....
January,February,March,April,May,June,July
28,48,40,19,86,27,90
65,59,80,81,56,55,40
....

However, in the generated HTML file, there is no tittle available.. is there some other thing I need to take care?

BR,Austin

ggrossetie commented 4 years ago

Your syntax is correct but the title is "ignored" by the extension.

xu4wang commented 4 years ago

OK. I see. thanks @Mogztter

Do you know is there any other chart extension?

I was using AsciidocFX before and there are chart diagram included with title and row name, however as I switched to TextMate, I cannot use the chart function came with AsciidocFX.

ggrossetie commented 4 years ago

Do you know is there any other chart extension?

I don't know but I would be interesting to find out :wink:

I was using AsciidocFX before and there are chart diagram included with title and row name, however as I switched to TextMate, I cannot use the chart function came with AsciidocFX.

The chart diagrams look great but, as far as I know, AsciidocFX is using its own implementation based on JavaFX so it won't work outside of JavaFX.

A while back we planned to extract the code in a proper Ruby project to make it easier to contribute. Would you be interested in adding new features/maintaining this new project? Maybe @cdanger and @chrisdutz would also be interested?

xu4wang commented 4 years ago

A while back we planned to extract the code in a proper Ruby project to make it easier to contribute. Would you be interested in adding new features/maintaining this new project? Maybe @cdanger and @chrisdutz would also be interested?

Do you mean create(extract) a new project dedicated for chart extension in Ruby? That will be great.

ggrossetie commented 4 years ago

Do you mean create(extract) a new project dedicated for chart extension in Ruby? That will be great.

Yes exactly!

xu4wang commented 4 years ago

@Mogztter FYI. I have some findings..

The asciidoctor-diagram already supports vega/vega-lite . Which has a lot of features on creating various chart.

https://vega.github.io/vega-lite/examples/

ggrossetie commented 4 years ago

Indeed that's a good alternative! For reference, I've also added Vega and Vega-Lite in Kroki so you can use it through https://github.com/mogztter/asciidoctor-kroki.

But I still think that the chart extension can be useful when you want to create a simple chart from a CSV file with little to no configuration.

xu4wang commented 4 years ago

For reference, I've also added Vega and Vega-Lite in Kroki so you can use it through https://github.com/mogztter/asciidoctor-kroki.

Thanks for sharing. The kroki project https://kroki.io/ looks great!

mojavelinux commented 4 years ago

Is this still relevant? If so, I'll relocate it to asciidoctor-chart.

ggrossetie commented 3 years ago

I think this issue is still relevant. In my opinion it should be possible to add a title on a chart.