Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Using the KTChartsWidget36


I'm using widget36, I use it in two different graphs, each one separately, but in both the bars come out blue, how can I change the color? I've tried several things, but I haven't been successful.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

You should create a new copy of KTChartsWidget36 as KTChartsWidget36_2 and setup your chart accordingly with own colors:


var height = parseInt(KTUtil.css(element, "height"));
var labelColor = KTUtil.getCssVariableValue("--bs-gray-500");
var borderColor = KTUtil.getCssVariableValue("--bs-border-dashed-color");
var baseprimaryColor = KTUtil.getCssVariableValue("--bs-primary");
var lightprimaryColor = KTUtil.getCssVariableValue("--bs-primary");
var basesuccessColor = KTUtil.getCssVariableValue("--bs-success");
var lightsuccessColor = KTUtil.getCssVariableValue("--bs-success");


Then recompile the theme assets with gulp as guided here.

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(