import 'package:json_annotation/json_annotation.dart';

part 'radar_chart_model.g.dart';

@JsonSerializable()
class RadarChartModel extends Object {
  RadarChartModel();

  factory RadarChartModel.fromJson(Map<String, dynamic> srcJson) => _$RadarChartModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$RadarChartModelToJson(this);
}


@JsonSerializable()
class RawDataSet extends Object {
  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'value')
  List<double> value;

  @JsonKey(name: 'itemStyle')
  ItemStyle? itemStyle;

  RawDataSet({required this.name, required this.value,this.itemStyle});

  factory RawDataSet.fromJson(Map<String, dynamic> srcJson) => _$RawDataSetFromJson(srcJson);

  Map<String, dynamic> toJson() => _$RawDataSetToJson(this);
}



@JsonSerializable()
  class ItemStyle extends Object {

  @JsonKey(name: 'color')
  String color;

  ItemStyle({required this.color});

  factory ItemStyle.fromJson(Map<String, dynamic> srcJson) => _$ItemStyleFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ItemStyleToJson(this);

}


@JsonSerializable()
class RawTitle extends Object {
  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'max')
  double max;

  RawTitle({required this.name, required this.max});

  factory RawTitle.fromJson(Map<String, dynamic> srcJson) => _$RawTitleFromJson(srcJson);

  Map<String, dynamic> toJson() => _$RawTitleToJson(this);
}
