Profile Picture

Stock representation

Posted By Joël Golinucci 10 Years Ago
Author
Message
Joël Golinucci
Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 30, Visits: 61
Hello,

I'm trying to represent a stock of matter divided into small blocks of H=2m, W=1m and D=1m but from an orthogonal top view so the height doesn't really matters. The issue I have is that my graph axes are not in the same scale (the stock I need to represent will have a variable width (up to 400m) and a fixed depth (45m).

This means if I uses a NCartesianChart with NPointSeries to represent the small blocks, these blocks (the points in the NPointSeries) will need not to look square but adapt to the axis.

Note: the stock width may change in runtime, but in this case it is OK to recreate the graph because it is not something that will append very often.

The final view has to look like each small block touches the ones around it to create a sort of plain surface (no border visible for the points).


On the screenshot attached you will see what I have now (the whole stock is divided in several graphs (min 1, max 3) per side.
On the bottom of the screenshot I zoomed and rotated a bit one of the graph to show the current (wrong) representation.

Thanks a lot for your help,

Best regards,

Joël Golinucci

Attachments
nevron graphs with zoom.png (237 views, 214.00 KB)
Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
The size of the points of a NPointSeries does not depend on the axis scale. You have to use one of the following series types:

1. NRangeSeries - for each data point you specify X,Y and Z begin-end values in scale units

or

2. NShapeSeries - for each data point you specify center and dimensions in scale units.


Probably the NRangeSeries is the better choice in this case, because it guarantees that there are no gaps between the boxes.



Best Regards,
Nevron Support Team



Joël Golinucci
Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 30, Visits: 61
Wow that's very close to what I expected just by choosing the correct type of series !

Now I need to do a few adjustments to ensure the correct positionning and everything but the look is good (see attached screenshot).


Here's the VB.Net code I'm using to add the shapes :


Dim i As Integer = 0
Dim ptLst As List(Of tGraphPoint) = fDataStorage.GetCells(fSubPile, plotVariable, layer, grid)
If ptLst IsNot Nothing Then
For Each pt As tGraphPoint In ptLst
fRangeSeries.Values.Add(pt.Z) 'Nevron Y start - Deepth (Z axis)
fRangeSeries.Y2Values.Add(pt.Z + 2) 'Nevron Y end
fRangeSeries.XValues.Add(pt.X) 'Nevron X start - Horizontal (X axis)
fRangeSeries.X2Values.Add(pt.X + 1) 'Nevron X end
fRangeSeries.ZValues.Add(pt.Y) 'Nevron Z start - Vertical (Y axis)
fRangeSeries.Z2Values.Add(pt.Y + 1) 'Nevron Z end
i += 1
fRangeSeries.FillStyles.Add(i, New NColorFillStyle(GetColorFromValue(pt.Value, plotVariable)))
Next
End If

The type tGraphPoint is a custom type where each element has 3 coordinates (X, Y and Z) and a value (representing a quality associated with this block)

Am I using correctly the FillStyle to specify a specific color for each point, not depending on it's coordinates but on a "4th dimension" quality value ?

Attachments
nevron graphs with NRangeSeries.PNG (219 views, 340.00 KB)
Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Joël,

For the FillStlyes collection (as well as BorderStyles, MarkerStyles, etc.) we recommend the usage of the indexer instead of the Add method:

rangeSeries.FillStyles(i) = New NColorFillStyle(Color.DarkOrange)



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic