Fixed currency support in pie chart (#342)

This commit is contained in:
FrancescoUK
2016-05-25 22:59:39 +01:00
parent ec5fbc16b5
commit 3c25a9ba8d

View File

@@ -24,7 +24,22 @@
plugins: [
Chartist.plugins.tooltip({
currency: '<?php echo $this->config->item('currency_symbol'); ?>'
transformTooltipTextFnc: function(value) {
<?php
if( $this->config->item('currency_side') )
{
?>
return value + '<?php echo $this->config->item('currency_symbol'); ?>';
<?php
}
else
{
?>
return '<?php echo $this->config->item('currency_symbol'); ?>' + value;
<?php
}
?>
}
})
]
};