moxx / chartist-plugin-fill-donut

MIT License
7 stars 15 forks source link

Any chance this can be modified to redraw on update? #1

Closed rstudner closed 8 years ago

rstudner commented 8 years ago

I tried updating it myself based on thougts from https://github.com/gionkunz/chartist-js/issues/494 but I couldn't get it to work.

Without this, the plugin can't really be used on any chart that updates itself.

moxx commented 8 years ago

Can you give me an example? On my test the chart is updated.

EDIT: I have added an option in develop branch, now it is also possible to update the plugin options:

chart.update({
        series: [245, 10 ],
        labels: ['', ''],
    },{
        total: 300,
//this is for override the plugin options
        fillDonutOptions : {
            items: [{
                    content: '<i class="fa fa-tachometer text-muted"></i>',
                    position: 'bottom',
                    offsetY : 10,
                    offsetX: -2
                }, {
                    content: '<h3>190<span class="small">mph</span></h3>'
                }]
        }
}, true);

https://jsfiddle.net/v081p70a/1/

moxx commented 8 years ago

long time nothing, so i think we are done here!