setData method 
    
    
    
  Implementation
  @override
void setData(int index, ChartSegment segment) {
  super.setData(index, segment);
  final num x1 = xValues[index];
  final num y1 = yValues[index];
  num x2 = double.nan;
  num y2 = double.nan;
  final int nextIndex = nextIndexConsideringEmptyPointMode(
      index, emptyPointSettings.mode, yValues, dataCount);
  if (nextIndex != -1) {
    x2 = xValues[nextIndex];
    y2 = yValues[nextIndex];
  }
  segment as LineSegment<T, D>
    ..series = this
    .._x1 = x1
    .._y1 = y1
    .._x2 = x2
    .._y2 = y2
    ..isEmpty = isEmpty(index);
}