pablrod / p5-Chart-Plotly

Generate html/javascript charts with perl data using javascript library Plotly.js
MIT License
9 stars 4 forks source link

Added working examples to the documentation some of the traces #3

Closed weatherwax closed 7 years ago

weatherwax commented 7 years ago

Added a working example to the documentation of some of the traces

pablrod commented 7 years ago

Great! Thanks for all this work!!!

Most of this files are autogenerated with generate.pl so I'm going to extract the examples to files under examples/traces/ folder that would be included with: # EXAMPLE: examples/traces/mesh3d.pl

This can be done using a Pod::Simple subclass.

If you want to help, just let me know!

pablrod commented 7 years ago

Extracted examples with Pod::Section and mixing Perl and Bash script:

for trace in `cd lib/Chart/Plotly/Trace; ls *.pm | cut -d "." -f 1`; 
do  
    perl -Ilib `which podsection` Chart::Plotly::Trace::$trace SYNOPSIS | grep -v SYNOPSIS | perltidy -sil=0 -o examples/traces/`perl -E "print lc $trace"`.pl; 
done;