Pre loader

Selectively remove chart borders

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

Answered
0
0

Hi,

I figure there is probably a way to do this, but I haven’t figured it out yet.

I would like remove (or maybe just make transparent?) my chart areas top and right borders, leaving the lefthand and bottom alone. I’ve attached an image with the borders circled that I would like to remove to make it clear.

Thank you.

Version
3.0.0.4253
Images
  • You must to post comments
Best Answer
0
0

Hi there,

Unfortunately we don’t support partiall removing of the border for renderable series area. To workaround this limitation you can set this border to be transparent and add several LineAnnotations at desired position:

// disable drawing of default border
surface.setRenderableSeriesAreaBorderStyle(sciChartBuilder.newPen().withColor(ColorUtil.Transparent).build());

// draw desired border using LineAnnotation
final LineAnnotation verticalLine = sciChartBuilder.newLineAnnotation()
                    .withPosition(0d, 0d, 0d, 1d)
                    .withCoordinateMode(AnnotationCoordinateMode.Relative)
                    .withStroke(4f, Color.RED)
                    .build();

final LineAnnotation horizontalLine = sciChartBuilder.newLineAnnotation()
                    .withPosition(0d, 1d, 1d, 1d)
                    .withCoordinateMode(AnnotationCoordinateMode.Relative)
                    .withStroke(4f, Color.RED)
                    .build();

Collections.addAll(surface.getAnnotations(), horizontalLine, verticalLine);

Is this suitable for your needs?

Best regards,
Yura

  • C Bolton
    Thank you. It looks like that will work.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies