-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- (breaking changes) removed series types in Highchart control, now i…
…t's separated classes; - other minor changes;
- Loading branch information
Showing
18 changed files
with
611 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace Highcharts | ||
{ | ||
using System.Drawing; | ||
|
||
public class SeriesAreaSolid : Series | ||
{ | ||
public SeriesAreaSolid() : this("") | ||
{ } | ||
|
||
public SeriesAreaSolid(string name) : base(name) | ||
{ } | ||
|
||
protected override void OnPaint(Graphics g, Rectangle clipRectangle) | ||
{ | ||
if (data.Count == 1) | ||
{ | ||
SeriesPaint.PaintPoint(this, g, clipRectangle, 0); | ||
return; | ||
} | ||
|
||
var valueRange = GetValueRange(); | ||
var xStep = GetXStep(); | ||
var areaColorAlpha = collection.GetColorAlpha(); | ||
var areaColor = Color.FromArgb(areaColorAlpha, color); | ||
|
||
var prevValue = data[0]; | ||
var prevValueX = GetXFromIndex(0, xStep, clipRectangle); | ||
var prevValueY = GetYFromValue(prevValue, valueRange, clipRectangle); | ||
|
||
for (float dataIterator = pointInterval; dataIterator < data.Count; dataIterator += pointInterval) | ||
{ | ||
double currentValue = data[(int) dataIterator]; | ||
|
||
float currentValueX = GetXFromIndex(dataIterator, xStep, clipRectangle); | ||
float currentValueY = GetYFromValue(currentValue, valueRange, clipRectangle); | ||
|
||
float width = currentValueX - prevValueX; | ||
|
||
g.uwfFillRectangle(areaColor, prevValueX, prevValueY, width, clipRectangle.Bottom - prevValueY); | ||
|
||
if (dataIterator + pointInterval >= data.Count) | ||
g.uwfFillRectangle(areaColor, currentValueX, currentValueY, xStep, clipRectangle.Bottom - currentValueY); | ||
|
||
prevValueX = currentValueX; | ||
prevValueY = currentValueY; | ||
|
||
SeriesPaint.PaintHoveredValueRect(this, g, currentValueX, currentValueY, xStep); | ||
} | ||
} | ||
|
||
protected override void OnPaintIcon(Graphics g, Rectangle clipRectangle) | ||
{ | ||
g.uwfFillRectangle(color, clipRectangle.Left + 4, clipRectangle.Top + 4, 8, 8); | ||
} | ||
} | ||
} |
Oops, something went wrong.