package Ġat . r tr . r mb t . android . view model Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġat . r tr . r mb t . android . ui . view state . Result Chart ViewState Ċ import Ġat . spec ure . data . entity . TestResult Graph Item Record Ċ import Ġat . spec ure . data . repository . Test Results Repository Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠResult Chart ViewModel Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġtest Results Repository : ĠTest Results Repository Ċ ) Ġ: ĠBase ViewModel () Ġ{ ĊĊĠĠĠ Ġval Ġstate Ġ= ĠResult Chart ViewState () ĊĊĠĠĠ Ġval Ġgraph Data : ĠLive Data < List < TestResult Graph Item Record >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġtest Results Repository . get Graph Data LiveData ( state . test UUID , Ġstate . chart Type ) ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġadd State Save Handler ( state ) ĊĠĠĠ Ġ} Ċ }