Pre loader

Strange redraw / render behavior uniformheatmap

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

I have a quite extensive code where I am able to draw a SVG annotation on top of heatmap. (please see video).

I am noticing strange behavior when I load the saved annotation and draw them on the screen. All of the them render out of place and remain there till one hovers with the mouse. as seen in video.

https://youtu.be/RiinjbGc6K8?si=u0BTL_B1Qz92ZiXt
strange behavior

my draw annotation code is below,

const drawAnnotation = (annotationList) => {
sciChartSurfaceRef?.current.suspendUpdates()
try {
annotationList.map(annotation => {
if (!sciChartSurfaceRef.current?.annotations?.getById(annotation.Id)) {
//console.log(annotation.Id, annotation.SVG)
annotation.createSVG(zoomdiff.current)
sciChartSurfaceRef.current?.annotations.add(
new ScalableAnnotation({
id: ${annotation.Id},
x1: annotation.DataBounds.shortestXinData,
x2: annotation.DataBounds.longestXinData,
y1: annotation.DataBounds.shortestYinData,
y2: annotation.DataBounds.longestYinData,
isEditable: ((annotation.UserId ? (annotation.UserId === userIdRef.current || annotationAuditor.current) : true) && annotation.Type === regionTypeRef.current),
isSelected: annotation.Selected,
yCoordinateMode: ECoordinateMode.DataValue,
xCoordinateMode: ECoordinateMode.DataValue,
verticalAnchorPoint: EVerticalAnchorPoint.Top,
horizontalAnchorPoint: EHorizontalAnchorPoint.Left,
svgString: annotation.SVG ? new XMLSerializer().serializeToString(annotation.SVG.node()) : undefined,
isHidden: false,
selectionBoxStroke: “#FFFF00FF”,
selectionBoxThickness: 1,
metaData: [heatmapSeriesRef.current.dataSeriesProperty.arrayWidth, heatmapSeriesRef.current.dataSeriesProperty.arrayHeight]
})
)
} else {
sciChartSurfaceRef.current.annotations.getById(annotation.Id).svgString = new XMLSerializer().serializeToString(annotation.createSVG().node())
}
})
} finally {
sciChartSurfaceRef.current.resumeUpdates({ invalidateOnResume: true })
//sciChartSurfaceRef.current.invalidateElement({ force: true });
}

Version
4.0.848
  • Andrew Burnett-Thompson
    Hi Pramod, this is a pretty incredible application you’ve made with SciChart.js first of all! It’s hard to see from the video exactly what is the problem, and diagnosing the issue would be difficult without seeing more of the code. To proceed with this – the only ways would be if you can either (1) provide us code to reproduce or (2) isolate and diagnose the problem in a smaller subset of your application, as there could be many moving parts (including incorrect code) that could be causing this issue. Can you provide us with further details?
  • You must to post comments
0
0

Hi Andrew,

it’s more than 8,000 lines of code and so it will be difficult to extract specific code. I have 4 issues with scichart showing some anomalous behavior I am dealing with.

  1. presented here, there is a delay in drawing annotation and it does not update till i move the mouse over the chart.
  2. When you have rotated chart the dimensions of the legend in an ouside div are also rotated (showed up after 4.0 upgrde)
  3. I get : Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘id’) on line SciChartSurface.js:318 when initializing the chart (showed up after 4.0 upgrde)
  4. Inability to pan in 3D plots (not anomolous but is a missing camera movement feature)

I am not sure if my license permits it but would it be possible to demonstrate over a zoom call? If not i understand. We are in a bit intense phase of the project and I will try mu best to elaborate on each as these issues.

Pramod

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.