improve the chart-diagram demo