You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Spec][Draft] Stepped series (DateSerie, TimeSerie, FloatSerie) #250
The feature
Be able to declare series for Chart with an auto generation of the labels part, accordingly to a range and step size.
API
[ class abstract BaseChartSerie ]
Property
Type
Description
Entries
IEnumerable
Get (only) the Entries
Name
string
Gets or sets the name of the serie
Color
SkColor?
Gets or sets the color of the fill
[class ChartSerie]
Inherit from BaseChartSerie
Property
Type
Description
Entries
IEnumerable
Overided for Get and set the Entries
[class abstract BaseChartEntry]
Generic BaseChartEntry with Typed Label value
Property
Type
Description
Value
float
Get the value
Label
TLabel
Gets or sets the caption label
ValueLabel
string
Gets or sets the label associated to the value.
Color
SkColor
Gets or sets the color of the fill.
TextColor
SkColor
Gets or sets the color of the text (for the caption label).
ValueLabelColor
SkColor
Gets or sets the color of the value label
[class ChartEntry]
Inherit from BaseChartEntry.
Equivalient of the actual ChartEntry
[class DateTimeChartEntry]
Inherit from BaseChartEntry.
[enum StepDateType]
Name
Description
Day
.
Week
.
Month
.
Year
.
[class DateSerie]
Inherit from BaseChartSerie
Property
Type
Description
Entries
IEnumerable
Overided - generate Entries on get
StartDate
DateTime
Gets or sets the start date of the range of labels
EndDate
DateTime
Gets or sets the end date of the range of labels
StepType
DateStepType
Gets or sets the DateStepType for generating the labels
StepValueInterval
int
Gets or sets the number of StepType between each value
StepLabelInterval
int
Gets or sets the number of StepType between the drawing of label
LabelFormat
string
Gets or sets the datetime label formats
Values
IEnumerable
Gets or sets the values entries with DateTime labels
Scenario
All the 'magic' will be made during the first Get of DateSerie.Entries, and the entries will be generated accordingly to the others option of the class.
The same type of class can be applied for TimeSeries, FloatSeries, and others.
With this API Model, no change will be made of the core charts.
I've split the value generation (StepValueInterval) and the label generation (StepLabelInterval). For example : That allow user to draw a chart with daily value, but with label draw every 7 days.
I think an other update is required to manage monthly label generation (the first of every month for example). I don't know if it's a needed feature. I need some feedback.
Activity
Seuleuzeuh commentedon Mar 23, 2021
I've split the value generation (StepValueInterval) and the label generation (StepLabelInterval). For example : That allow user to draw a chart with daily value, but with label draw every 7 days.
I think an other update is required to manage monthly label generation (the first of every month for example). I don't know if it's a needed feature. I need some feedback.
eman1986 commentedon Mar 26, 2021
this looks pretty good, I like the direction you're going with this.