pie_chart and bar_chart as separate js