How to change a bar color of "Bar Chart"

How to change a bar color of "Bar Chart"

  

I tried to change a bar color of  "Bar Chart", but I can't changed.

By default, a bar color is changed automatically when hovered.
But I want to assign the another color.

Please advice to me how to assign another color to a  bar  when hovered.

Thanks!!


Environment

- OutSystems mobile:

- Silk Web UI:Version 1.2.1

- ServiceStudio:1.0.611.0

- Device: iPhone 6


Takahiro Sato wrote:

I tried to change a bar color of  "Bar Chart", but I can't changed.

By default, a bar color is changed automatically when hovered.
But I want to assign the another color.

Please advice to me how to assign another color to a  bar  when hovered.

Thanks!!


Environment

- OutSystems mobile:

- Silk Web UI:Version 1.2.1

- ServiceStudio:1.0.611.0

- Device: iPhone 6


Hi, Have you assigned value to the color variable? Try it assigning the value.

Sachin


Sachin Mahawar wrote:

Takahiro Sato wrote:

I tried to change a bar color of  "Bar Chart", but I can't changed.

By default, a bar color is changed automatically when hovered.
But I want to assign the another color.

Please advice to me how to assign another color to a  bar  when hovered.

Thanks!!


Environment

- OutSystems mobile:

- Silk Web UI:Version 1.2.1

- ServiceStudio:1.0.611.0

- Device: iPhone 6


Hi, Have you assigned value to the color variable? Try it assigning the value.

Sachin


Thank you for answer!

But I wonder how I can change the "Color" when hovered dynamically.
I suppose some event handler is needed to change the color dynamically.

If you have any idea, please let me know!!

Thanks.



Solution

Hi Takahiro-san,

You don't need an event handler. The underlying library that charts use is Highcharts, and it has a well documented API. The colour for hover can be set in the JSON that you provide in the chart's extended properties. See here for documentation about the hover colour.

Solution

Kilian Hekhuis wrote:

Hi Takahiro-san,

You don't need an event handler. The underlying library that charts use is Highcharts, and it has a well documented API. The colour for hover can be set in the JSON that you provide in the chart's extended properties. See here for documentation about the hover colour.

Thank you for your answer!!

I saw the documentation that you suggested.

I  changed the "AdvancedFormat_init" as below and the color can be changed!!

  • Bar Chart


  • Column chart


Thank you for your useful answer!!


Hi Takahiro-san,

Glad I could be of help :). In general, if you want to change things about charts, visiting the Highcharts documentation is a good start.