asciidoctor / asciidoctor-extensions-lab

A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
105 stars 101 forks source link

Align chart extension with AsciiDoc conventions #30

Closed mojavelinux closed 9 years ago

mojavelinux commented 9 years ago

To be consistent with the <name>::<target>[<attributes>] convention, I think we should change the placement of arguments so the data is <target> and the chart type is the first positional attribute. I think chart type should default to "line" if not specified.

chart::sample.csv[line]

chart::sample.csv[bar]

chart::sample.csv[step]

chart::sample.csv[spline]

I think we should also support positional attributes for x and y label as well as size.

chart::<data-uri>[<type>,<x-label>,<y-label>,<width>,<height>]

We should also support a block form where the data is specified in a literal block:

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

It will be necessary to register separate extensions for the block macro and block forms, but they can share common code.

ggrossetie commented 9 years ago

Resolved by #28 in 9ce5d0c

ggrossetie commented 9 years ago

I can't close this issue :cry:

mojavelinux commented 9 years ago

Welcome to the asciidoctor-extensions-lab team! You should now be able to modify all issues.