Line series not being drawn

2 posts, 1 answers
  1. Czeshirecat
    Czeshirecat avatar
    66 posts
    Member since:
    Jun 2016

    Posted 20 Sep 2019 Link to this post

    My lineseries won't draw the line between points unless I use the category menu to change the palette at run time. I need to define my own palette.

    What have I missed, or is this a bug?

    Please see extracted solution that shows the problem. I've hand coded all the series etc as messing too much in the designer seems to corrupt the design file.

  2. Answer
    Dimitar avatar
    2960 posts

    Posted 23 Sep 2019 Link to this post

    Hello Claire,

    You need to add to colors like this: 

    private class CustomPalette : ChartPalette
        public CustomPalette()
            var color1 = Color.Purple;//Color.FromArgb(40, Color.Silver);
            var color2 = Color.CornflowerBlue;
            var color3 = Color.DarkBlue;
            var color4 = Color.LawnGreen;
            var color5 = Color.Red;
            var color6 = Color.Pink;
            var color7 = Color.Black;
            var color8 = Color.Orange;
            GlobalEntries.Add(color1, color1);
            GlobalEntries.Add(color2, color2);
            GlobalEntries.Add(color3, color3);
            GlobalEntries.Add(color4, color4);
            GlobalEntries.Add(color5, color5);
            GlobalEntries.Add(color6, color6);
            GlobalEntries.Add(color7, color7);
            GlobalEntries.Add(color8, color8);

    The first argument specifies the fill color, the second the border color which is used for the line. 

    I hope this helps. Should you have any other questions, do not hesitate to ask.

    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top