Fix pie chart legend issue