Tuleap Community Edition development and releases are no longer public. You have until September 30th to download packages and sources in Tuleap project. You can contact the team if you need further assistance.

    •  
      request #11326 Refactor graphs' layout builder
    Infos
    #11326
    Thomas Gorka (tgorka)
    2018-04-24 14:42
    2018-03-29 11:06
    11662
    Details
    Refactor graphs' layout builder
    chart-layout-builder, the service used to generate the graphs layout has too much responsibilities. It:
    - Draws the svg container
    - Initializes the axes
    - Draws the axes
    - Draws the graph's legend
    - Format the x-axis labels

    The problem today is that it is difficult to customize the layout regarding of the type of graph we want to draw. For instance, We can't draw a graph without a legend and a badge. Moreover, the labels formatting is design to format labels from time scales, and is not compatible with bar charts (which can display whatever they need o display on the x-axis other than a date -> cf. velocity chart -> sprints names).

    The current architectures makes the layout-builder a god object we have to adapt to. The new architecture will have to be the opposite situation: The layout can be adapted to the graphs needs: legend or not, formatted x-axis labels or not etc.

    The refactoring has to be done in 3 steps:
    1. Extract the labels formatting for time scales in a dedicated class
    2. Extract the legend generator in a dedicated class
    3. Turn chart-builder into a ES6 class

    No functional change has been planned.
    Empty
    Empty
    Empty
    • [x] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gorka (tgorka)
    Closed
    2018-04-24
    Attachments
    Empty
    References
    Referenced by request #11326

    Follow-ups

    User avatar
    Thomas Gorka (tgorka)2018-03-29 14:26
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes