Hi~
How to create dotted line cursor like a dashed line curve?
Thanks.
- kim2 kim asked 8 months ago
- You must login to post comments
Hi there
Depending on which modifier you are using, if CursorModifier then the property crosshairStrokeDashArray will give you a dotted line.
Try this:
// Create a SciChartSurface
const { sciChartSurface, wasmContext } = await SciChartSurface.create(divElementId);
// Add CursorModifier behavior
const cursorModifier = new CursorModifier({
crosshairStroke: "#ff6600",
crosshairStrokeThickness: 1,
crosshairStrokeDashArray: [2, 2]
});
sciChartSurface.chartModifiers.add(cursorModifier);
If you are using the RolloverModifier then a similar property rolloverLineStrokeDashArray affects the cursor line stroke
const rollover = new RolloverModifier();
rollover.rolloverLineStrokeDashArray = [2,2];
rollover.rolloverLineStroke = "SteelBlue";
rollover.rolloverLineStrokeThickness = 2;
sciChartSurface.chartModifiers.add(rollover);
The strokeDashArray property defines an array which is [dash-length, dot-length]. Try experimenting with [2, 2] or [10, 3] to see how it effects the line.
Let me know if this helps
Best regards
Andrew
- Andrew Burnett-Thompson answered 8 months ago
- You must login to post comments
Please login first to submit.