Series colors reflect default theme instead of custom theme

6 posts, 1 answers
  1. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2016

    Posted 02 Jun Link to this post

    I'm developing an AngularJS app with Kendo UI Professional. Using the theme builder and the default theme as a base, I've set the color desired color values and downloaded my custom theme. In my index.html I've included the kendo.common-bootstrap.min.css file, followed by my kendo.custom.css which has the desired color selections on everything except chart series colors. All chart series colors default to the default theme colors. What am I doing wrong? I've tried other themes as well (Metro, Fiori, etc...) with the same outcome.

  2. Answer
    Stefan
    Admin
    Stefan avatar
    276 posts

    Posted 06 Jun Link to this post

    Hello Adam,

    I can assume the issue is caused because the JSON content from the .zip is not added to the project.

    In the .zip file that you have downloaded there is one JSON file, which is specifically needed to apply a custom theme to the Kendo UI Chart:

    http://docs.telerik.com/kendo-ui/styles-and-layout/themebuilder

    Check the following example on how to take the data from the JSON file, and used to apply the custom theme, that you have created:

    http://docs.telerik.com/kendo-ui/controls/charts/how-to/customize-chart-theme

    Let me know if you need additional assistance.

    Regards,
    Stefan
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2016

    Posted 06 Jun in reply to Stefan Link to this post

    Yes you are correct. This is not clear in the documentation. I will make this an AngularJS constant and apply accordingly.
  5. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2016

    Posted 06 Jun in reply to Stefan Link to this post

    Now that I've created a constant for my custom theme, I see no way to bind that theme data to the charts directive. I tried k-series-defaults="{theme: myTheme}" and k-theme="myTheme" for lack of anything clearer.
  6. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2016

    Posted 06 Jun Link to this post

    Success. I dove a little deeper and found k-options and bound the charts object to k-options, i.e. k-options="myTheme.charts".
  7. Stefan
    Admin
    Stefan avatar
    276 posts

    Posted 07 Jun Link to this post

    Hello Adam,

    Thank you for reporting the issue with the Kendo UI documentation and for the idea to use k-options to bound the chart object to it. I'm glad to inform you that the documentation has been already improved.

    Every suggestion to improve our documentation is highly appreciated 

    Regards,
    Stefan
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready