make the chart wrok correctly in offcie