private void progressionChart_DataClick(object sender, ChartPoint chartPoint)
        {
            var chart = progressionChart;

            if (chartPoint == null)
            {
                bool pointExistInChart = this.pointExistInChart(selectedCaseId);
                if (nextPrevClicked && !pointExistInChart)
                {
                    double newScale = calcScale(chartValues.Count);
                    SelectedCaseScaleChangedEvent?.Invoke(selectedCaseId, newScale);
                }
                else
                {
                    selectDefaultChartPoint(selectedCaseId);
                    SelectedCaseChangedEvent?.Invoke(selectedCaseId);
                }
                SelectChartDataPointEvent?.Invoke(selectedCaseId);
            }
            else
            {
                previousSelected.Selected = false;                     //Deselect the current chart point selection

                RLVChartData data = (RLVChartData)chartPoint.Instance; //Get the current chart point and set as the default selection
                data.Selected    = true;
                previousSelected = data;

                //Invoke event for selecting new case
                SelectedCaseChangedEvent?.Invoke(data.CaseId);
                SelectChartDataPointEvent?.Invoke(data.CaseId);
            }

            ((IRLVProgressionChartVM)ViewModel).CurrentTime  = previousSelected.Time;
            ((IRLVProgressionChartVM)ViewModel).CurrentScore = previousSelected.Score;

            //progressionChart.Update(true, true);
            createAxis();
            nextPrevClicked = false;
        }
Exemple #2
0
 public void IRLVProgressionChartPantl_SelectChartDataPointHandler(long selectedCaseId)
 {
     SelectChartDataPointEvent?.Invoke(selectedCaseId);
 }