Forum Stats

  • 3,871,698 Users
  • 2,266,320 Discussions
  • 7,910,895 Comments

Discussions

default unselect filter to chart

ValentinShinkarenko
ValentinShinkarenko Member Posts: 11 Green Ribbon
edited Mar 15, 2021 8:43AM in Oracle JET

Hello everyone! I need to unselect the "On Hand" filter in the default state for my chart.

I read this link and tried to implement it in my code in different ways, but it did not give any results

I would be grateful for any advice!

Best Answer

  • ValentinShinkarenko
    ValentinShinkarenko Member Posts: 11 Green Ribbon

    The problem is solved, since my version of Oracle Jet is 9.1.0 I could not add <oj Legend> in my code.

    the solution to the problem in three lines:

    1) add to in <oj-chart> in HTML

    hidden-categories="{{hiddenCategories}}"

    2) add a dependency with HTML in JS file

    self.hiddenCategories = ko.observableArray([]);

    3) add a hidden category in necessary function (I addressed her through the name)

    self.hiddenCategories(['On Hand'])

Answers

  • ValentinShinkarenko
    ValentinShinkarenko Member Posts: 11 Green Ribbon

    The problem is solved, since my version of Oracle Jet is 9.1.0 I could not add <oj Legend> in my code.

    the solution to the problem in three lines:

    1) add to in <oj-chart> in HTML

    hidden-categories="{{hiddenCategories}}"

    2) add a dependency with HTML in JS file

    self.hiddenCategories = ko.observableArray([]);

    3) add a hidden category in necessary function (I addressed her through the name)

    self.hiddenCategories(['On Hand'])