redefined bar graph structure API