This is a migrated thread and some comments may be shown as answers.

Set Marker Backgrounds to Match Stroke Color

5 Answers 131 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Kara
Top achievements
Rank 1
Veteran
Kara asked on 12 Jun 2020, 04:25 AM

Hi, I've been trying to figure out a way to make the markers on my scatter chart solid. It'd be nice if there was a prop for this.

I am able to set the color with a function, but that only sets the stroke color. I can set the background in the marker props, but that doesn't take a function so some of my points don't have a matching background to stroke. 

5 Answers, 1 is accepted

Sort by
0
Kara
Top achievements
Rank 1
Veteran
answered on 12 Jun 2020, 04:33 AM
Found a solution: I can set the border width and it looks filled in as desired.
0
Silviya Stoyanova
Telerik team
answered on 15 Jun 2020, 01:25 PM

Hello Kara,

I am glad to read that you found a solution on your own to your question. I would like to clarify that Kendo UI provides built-in functionality for setting a background color of the series markers. As you will find in the documentation the series.markers.background can be set via a function.

And here you could see a runnable example: https://dojo.telerik.com/@Silvia/oLiQEyAK

If I can be of any assistance, please, let me know.

Kind Regards,
Silviya Stoyanova
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Kara
Top achievements
Rank 1
Veteran
answered on 15 Jun 2020, 10:28 PM

Hi Silviya,

Ah, I must have mistakenly posted in the wrong forum. I am using Kendo UI with React. Does it also accept a function for the React component? I moved onto something else at the moment and cannot easily test this or I would. 

Thanks,

Kara

0
Accepted
Stefan
Telerik team
answered on 17 Jun 2020, 12:16 PM

Hello, Kara,

I`m part of the KendoReact team and I can confirm that the KendoReact Chart also accepts a function for the background:

https://stackblitz.com/edit/react-gycxv3?file=app/main.jsx

Still, I see that it is marked in the documentation only as a string and we will update that:

https://www.telerik.com/kendo-react-ui/components/charts/api/ChartSeriesMarkersProps/#toc-background

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Kara
Top achievements
Rank 1
Veteran
answered on 17 Jun 2020, 03:19 PM

Hi Stefan,

Thanks!

Kara

Tags
Charts
Asked by
Kara
Top achievements
Rank 1
Veteran
Answers by
Kara
Top achievements
Rank 1
Veteran
Silviya Stoyanova
Telerik team
Stefan
Telerik team
Share this question
or