fix chart pixel indexing