Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1432

I can set a goal line in all reports with area chart visualization

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 2.2.0
    • None
    • frontend
    • None

      AT:

      • I can set a target value for all reports with visualization set to area chart
      • The target can be configured like in the number/bar report using the target double button
      • Pressing the target button the first time a modal opens where I can set the target value and if the actual values should be below or above the target value
      • Confirming the target modal draws a horizontal red line on the height of the configured target value into the area chart
      • The parts of the area chart that doesn't meet the target value are painted in red, e.g. I set a target that all values should be below 10. If the line starts below 10, then exceeds 10, falls below 10 and then exceeds 10 again there should be two areas painted red.
      • When I press the target button again, the goal line is being removed and also the area is painted blue as usual
      • The feature is documented in the user guide

        This is the controller panel for Smart Panels app

            [OPT-1432] I can set a goal line in all reports with area chart visualization

            Some review hints:

            • I think LineValue should not be capitalized to avoid confusion with a class or React component
            • I find the fillLineGaps method very hard to read and understand. I would recommend to:
              • use curly braces for the one line ifs
              • not return assignments
              • maybe add some source code comments
            • Could we preserve the target value when the user changes the visualization between bar chart and line chart?

            Sebastian Stamm added a comment - Some review hints: I think LineValue should not be capitalized to avoid confusion with a class or React component I find the fillLineGaps method very hard to read and understand. I would recommend to: use curly braces for the one line ifs not return assignments maybe add some source code comments Could we preserve the target value when the user changes the visualization between bar chart and line chart?

            I removed the fillGaps function completely because it was not necessary

            Omran Abazeed added a comment - I removed the fillGaps function completely because it was not necessary

            Even better

            The configuration field still always exists even though it is only changed in the new if block. I would move the addition of the configuration field into the if block.

            Also, using update.configuration.targetValue is shorter and more common than update.configuration['targetValue'].

            Sebastian Stamm added a comment - Even better The configuration field still always exists even though it is only changed in the new if block. I would move the addition of the configuration field into the if block. Also, using update.configuration.targetValue is shorter and more common than update.configuration['targetValue'] .

              Unassigned Unassigned
              johannes.heinemann Johannes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: