SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

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.