cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
25 stars 45 forks source link

Actualize and fix code example in Creating Chart with Incremental Data Update #764

Open lovtsovaik opened 3 years ago

lovtsovaik commented 3 years ago

Environment

Description of the bug or enhancement

§2.6.5

  1. Actualize steps in point 4 according to the new version of the platform Designer tab -> Component Palette (?) Non-visual components -> Fasets

  2. The onTimer field is deprecated, needs to subscribe to TimerActionEvent in the screen controller instead (see https://doc.cuba-platform.com/manual-7.2/gui_Timer.html) So the example needs to be updated

  3. Typo in code: ;; in updateChart function (in point 5 and 6)

  4. Not working functionality:

    When the queue size exceeds 10 items, the oldest item is excluded.

add itemsQueue.add(initialValue); after ordersDc.getMutableItems().add(initialValue); and replace ordersDc.getMutableItems().add(item); on ordersDc.getMutableItems().remove(item);