fix id uniqueness issue to support multiple same-type charts on the same page