LightningChart最新版v.8.3全新發布,主要介紹以下五個新功能及使用教程。
1. 網格模型,三角鼠標追蹤
Tracing MeshModels with mouse. Traced result is shown in an Annotation.
使用MouseTriangleTraced 事件. 鼠標將會顯示離相機最近的三角形
事件參數信息如下:
- IntersectionPointAxisValues: intersection point of triangle face, in axes values
- ModelSpaceTriangleCoordinates: array of 3 triangle corners (vertices) the mouse is hitting, in 3D model space coordinates
- WorldSpaceTriangleCoordinates: array of 3 triangle corners (vertices) the mouse is hitting, in 3D world space coordinates.
- NearestCoordinateIndex: Index of nearest coordinate index of traced triangle, value of 0…2. Use the index to extract the coordinate from ModelSpaceTriangleCoordinates or WorldSpaceTriangleCoordinates array.
2. SeriesEventMarkers新樣式,Y軸投影
除了常用樣式外,SeriesEventMarker支持兩個特殊的Symbol.Shape樣式設置,實現垂直線與Y軸刻度投影,如圖中的HollowYAxis 和 HollowYAxisActive。它們具有1像素寬的垂直線,並且從Y軸 MajorTicks 和MinorTicks 中選取位置。如需調整刻度長度,請編輯YAxis.MajorDivTickStyle.LineLength 和 YAxis.MinorDivTickStyle.LineLength 屬性。
特殊事件標記樣式HollowYAxis 和HollowYAxisActive,便於製作每個系列數據遊標。
3. XY線圖顏色和樣式事件改進
在事件參數中添加數據點指數:
- HasDataPointIndices: Only applicable in FreeformPointLineSeries.
- DataPointIndices: Data point indices that were included in the coordinates and colors arrays. Note: chart will skip subsequent points in line construction, if their X and Y values or coordinates are equal. Using DataPointIndices info, you can e.g. pick a color for line point, from data point’s PointColor field or external color array.
4. 極地視圖PointLineSeries中新添線樣式及顏色事件中設有座標和顏色操作事件CustomLinePointColoringAndShaping。它包含與XY圖相似的數據點指數 (請參考第3小節).
CustomLinePointColoringAndShaping event used to manipulate colors and coordinates of line.
5. 極座標圖軸增強
- 軸可以通過幅度,角度或兩者來反轉。
反轉角度比例,設置AngularReversed = True.反轉幅度比例,設置AmplitudeReversed = True.
左邊的比例沒變,右邊 AngularReversed = True and AmplitudeReversed = True.
- 相比極地圖一般方位,給與不同角度的幅度比例
支持 AmplitudeAxisAngle轉換幅度軸位置。幅度比例角度可以設置爲精準的角度(AmpitudeAxisAngleType = Absolute), 或 (AmpitudeAxisAngleType = Relative).
AngleOrigin = 30. AmplitudeAxisAngle = 90. On the left, AmplitudeAxisAngleType = Absolute. On the right, AmplitudeAxisAngleType = Relative: Overall the amplitude scale rotates 120 degrees in this case.
- 角度分區設置
默認情況下,圖表儘量包含可能多的角度分割。控制角度分區,請設置AngularAxisAutoDivSpacing to False. 圖表將會計算AngularAxisMajorDivCount分割區域數。如果圖表空間太小而無法渲染所有分區和標籤,則會使用可以容納的分區數量。