I’m sorry I couldn’t attach images because of security.
Zoom out
VisibleRange X1 min VisibleRange X1 max
+——————————–+ VisibleRange Y1 min
| |
| |
|s=================e|
| |
| |
+——————————–+ VisibleRange Y1 max
s : Point Start, e : Point End
In this state, Excute Zoom In Then “s====================e” disappears when the starting point is smaller than min and the end point is greater than max.
Zoom In : “s====================e” disappear
VisibleRange X2 min VisibleRange X2 max
+——————————–+ VisibleRange Y2 min
| |
| |
| |
| |
| |
+——————————–+ VisibleRange Y2 max
I want this chart
VisibleRange X1 min VisibleRange X1 max
+——————————–+ VisibleRange Y2 min
| |
| |
|===================|
| |
| |
+——————————–+ VisibleRange Y2 max
How do I draw when a chart is not drawn at the location of a given data using “CustomRenderSeries”?
“====” is a BOX(Rectangle), not a line.
The program source used for coding.
I am currently using
renderableSeries.ResamplingMode = ResamplingMode.None;
// DataInsert.cs
var renderableSeries = new DieRenderableSeries(positionOfDie, _dieLayout);
foreach (var pl in _dieLayout.PlaneLayout._plane)
{
Plane plane = pl.Value;
foreach (var ba in plane._bank)
{
Bank bank = ba.Value;
foreach (var matList in bank.NandMat)
{
var renderableSeries = new DieRenderableSeries(positionOfDie, _dieLayout);
List<KeyValuePair<Point, Mat>> matDataList = new List<KeyValuePair<Point, Mat>>();
foreach (var mat in matList)
{
mat.PointType = PointType.Start;
matDataList.Add(new KeyValuePair<Point, Mat>(new Point(startX + mat.X1, startY + mat.Y1), mat));
}
var myList = matDataList.OrderBy(x => x.Key.X)
.ThenBy(x => x.Key.Y)
.ToList();
var dataSeries = new MatDataSeries<double, double> { SeriesName = “Fault” };
dataSeries.AcceptsUnsortedData = false;
using (dataSeries.SuspendUpdates())
{
for (var i = 0; i < myList.Count(); i++)
{
Point myPoint = myList[i].Key;
dataSeries.Append(myPoint.X, myPoint.Y, myList[i].Value);
}
}
sciChart.RenderableSeries.Add(renderableSeries);
renderableSeries.DieX = dieX;
renderableSeries.DieY = dieY;
renderableSeries.DataSeries = dataSeries;
renderableSeries.CountOfRenderableSeries = dataSeries.Count;
renderableSeries.ResamplingMode = ResamplingMode.None;
}
}
}
// CustomRenderableSeries.cs
for (var i = 0; i < _series.Count; i++)
{
var data = renderPassData.PointSeries[i];
var mat = (Mat)DataSeries.Metadata[data.Index];
Point point = GetCoordinatesFor(data.X, data.Y);
Point point2 = GetCoordinatesFor(data.X + mat.Width, data.Y + mat.Height);
IBrush2D brush = _dicBrush[mat.TypeX];
var pen = _bgndPens[mat.IsRedun && IsRedunVisibled ? 1 : 0];
drawingHelper.DrawBox(point, point2, brush, pen, 0);
}
- Park Geolgyu asked 5 years ago
- last active 5 years ago