/** * Create a new CHART */ function svg_new() { $images = plugin_dir_url(__FILE__) . '/assets/images/'; $data['h1'] = 'Create a New SVG Graphic'; return parent::gc_get_template($data, 'admin/svg_new.php'); }
<div class="left"> <canvas id="chart" width="600" height="300"></canvas> </div> </div> <div class="left"> <h3>SVG Maps and Graphics</h3> <p>You will still need a developer to write code to create SVG graphics. But they can now be added using the wordpress admin, which means that hosting and maintenance will be a lot earlier. You will also not have to wait for any deployments, since you can upload your files as soon as the developer finishes it. </p> <button class="new" data-type="svg">New SVG Graphic</button> </div> <div class="left"> <?php echo Cap_Graphics::gc_svg_shortcode(array('svg' => 'electoral')); //echo do_shortcode('[cap_svg svg="electoral"]'); ?> </div> <script src="/wp-content/plugins/cap-graphics/assets/js/common/Chart.min.js"></script> <script> jQuery(document).ready(function($) { $.getJSON('/wp-content/plugins/cap-graphics/assets/templates/admin/home.json') .done(function( data ) { var data = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [ { label: "My First dataset", fillColor: "rgba(220,220,220,0.5)", strokeColor: "rgba(220,220,220,0.8)",