Looking for possibility from chartsKt to keep only 1 highlight decorator if there are many one on each other

Hello Pierre,

As discussed in today’s call.
For Attributive chart, space chart can have ‘n’ number of lines. Each mark point adds a highlight decorator due to which line is getting thicker. Is there any possibility from chartsKt to keep only 1 highlight decorator if there are many one on each other?]

image

using following highlight decorator

drawingZone.rect {
  x = position.x - w / 2
  y = .0
  width = w
  height = drawingZone.contentHeight
  fill = Colors.Web.gray.opacify(0.1)
  strokeColor = null
}

It is important for next webchart release.

I cannot reproduce this issue using multiple line marks and Chart’s default setup, but only when using highlightMode = HighlightMode.Series (which is not what you’re aiming for as you are not using series but multi-marks).

Also, the “cursor” is what you need, when I look at your decorator, I think you don’t need anything else (and cursor can be customised using a CursorDecorator if needed)

We can have a quick meeting if you need to, but I would recommend these steps (until you get the expected result):

  1. activate the cursor and remove your highlightDecorator:
       config {
            cursor {
                show = false
            }
        }
  1. or remove the cursor, and use your custom decorator, but force the highlight mode:
        config {
            cursor {
                show = false
            }
            events {
                highlightMode = HighlightMode.Single
            }
        }
  1. if the result is still not as expected, please ping me back.
1 Like

Hello Pierre,

Thanks for the reply.

We need both cursor and highlight decorator.

We solved it internally by adding highlight decorator only on the first line in chart (if it has multiple lines)

So, this way we solved it.

Many Thanks