Update class and example to allow dynamic data adding to chart, optionally limiting data count and setting chart range manually.