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
104 stars 101 forks source link

Added feature to chart-block macro - set X/Y axis labels and data names in c3js-generated charts #114

Closed cdanger closed 4 years ago

cdanger commented 4 years ago

Adding new attributes 'axis-x-label', 'axis-y-label' and 'data-names' to chart-block macro. Only for c3js backend. Added examples of usage to sample.adoc file.

cdanger commented 4 years ago

Could anyone (with write access) consider merging this pull request? Feel free to give me write access if this helps ;-)

mojavelinux commented 4 years ago

I believe it is time to graduate this extension out of the repository. I'm going to do that now. I don't want to continue to push code into the extension here and encourage people to use it in production. This is a lab and once an extension starts to take on its own life (meaning getting PRs and needing maintenance) it really needs to be moved out of here.

mojavelinux commented 4 years ago

I have set up the asciidoctor-chart repo, imported the code, and included this patch. See https://github.com/asciidoctor/asciidoctor-chart

I have not verified that the code works in its current form, so it will need to be tested and possibly fixed.

cdanger commented 4 years ago

Thanks, I appreciate it :-)

mojavelinux commented 4 years ago

:+1:

@cdanger could you test the code in the new repo to make sure I didn't mess anything up?

cdanger commented 4 years ago

Well, I am happy to try but I need a bit of help. With the asciidoctor-extensions-lab repository, I do this alright:

$ asciidoctor -r  ./lib/chart-block-macro.rb ./lib/chart-block-macro/sample.adoc

With the new repository (asciidoctor-chart), I tried this:

$ asciidoctor  -r ./lib/asciidoctor-chart.rb examples/example.adoc

and got this error

Failed to load AsciiDoc document - uninitialized constant Asciidoctor::Chart::BlockMacro
Did you mean?  Asciidoctor::BlockMediaMacroRx

Am I doing this wrong?

mojavelinux commented 4 years ago

Nope, nothing wrong. But you did do exactly the right thing, which is to verify that it's not working. I just fixed the code. Can you pull and try again?

cdanger commented 3 years ago

Works for me now :-)

mojavelinux commented 3 years ago

Fantastic! Thanks for verifying.

I'll proceed with removing the extension from the lab and rerouting users to the newly created project. Any further issues regarding this extension should be addressed there.

mojavelinux commented 3 years ago

The extension has been removed from the lab. It now lives here: https://github.com/asciidoctor/asciidoctor-chart