Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot changes/enhancements Epic #142

Open
11 of 28 tasks
jrchudy opened this issue May 4, 2023 · 0 comments
Open
11 of 28 tasks

Plot changes/enhancements Epic #142

jrchudy opened this issue May 4, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request Epic

Comments

@jrchudy
Copy link
Member

jrchudy commented May 4, 2023

This Epic should be used to track each functionality of plot app that we still want to consider supporting after the migration to ReactJS. Some issues come from issue #73 and issue #122. Other comments are from individual issues.

Config Issues:

  • Config should be fetched from json file instead of the js (which is current implementation)
  • Config can be installed anywhere on the deployment (issue plot config can come from anywhere on deployment #92)
    • configs can be installed anywhere but the build process places them in the config folder
  • allow for default plot config using * as the key (issue Allow for default plot config using "*" #120)
  • add data to plotly object in config
    • treat data the same as layout and config
      • use as is and then add more values to it by the application to initialize defaults if not set
    • what if x/y arrays are part of data
      • if no queryPattern in traces then use x/y data
        • requires big changes to code to ignore making the requests and setting up the app without that data
      • if both x/y data and queryPattern in traces, then queryPattern data will be used ignoring the configuration in data
  • move traces information to plotly.data
    • this allows for overriding plotly.data
      plotly.data: {
        type: '', // currently plots[0].plot_type
        url_pattern: '',
        response_format: '',
        x_col_pattern: ['', '', ...],
        y_col_pattern: ['', '', ...]
      }
      
    • support added in issue Max height and plotly.data #203
  • change traces to mean "plot traces" where currently it means "dataset traces"
    • once the above has been done to fully support plotly.data and remove the need for traces, we can change this to be used for each trace in the plot
    • allows for multiple plot types to be displayed in the same plot (bar + line)
  • add sources array to use in plotly.data
    • something similar to what we did for source definitions, needs more details
  • further support for data from different sources
    • reference.read if url is provided as ermrest url
      • should we support chaise url and use chaise function for converting to ermrest url?
  • configuration changes in comment from issue Migrate Violin plot type to react #135
    • use consistent case, change all snake_case to camelCase
    • plot_type moved to each defined trace as type
      • allows for multiple traces to be defined with different plot types in one displayed plot
      • example: having a bar and line plot together
    • rename gene and study uri pattern properties to be generic.
      • part of "generalizing selector configuration language" to support more selectors than just gene/study on rbk/gudmap/atlas
  • config property to allow for a configurable plot app container (Configurable plot app container #163)
  • define a configuration syntax for the grid component of selectors (array of arrays in the code hardcoded for violin plot)
  • change url_parameters to not mix the notion of url parameters and controller values
    • related to issue Plot app: Configurable User Controls functionality in plot-config #156
    • this will get tricky with how templates are defined. If url_parameters is a static object, that means templates should never rely on them and instead use $filters as defined below
      $url_parameters: {
        Study: ["xxxx", ...],
        NCBI_GeneID: "xxxx"
      },
      $filters: {
        Study: [Tuple, ...] // Study Tuples
        Gene: Tuple, // Gene Tuple
        rows: [Tuple, ...] // Replicate_Expression Tuple with all data
      },
      $row: [response.data[0], ...]
      

Layout and selector issues:

  • multiple pie charts displayed side by side. issue Plot App changes for Facebase #126 describes this in more detail
  • Add a selector for data(dropdown) for a particular config.
  • add a button to remove query params and enable all selectors
    • rough implementation done, revisit if needed
  • "no studies selected" italic text similar to "all studies selected"
  • all studies is represented as [] in the code which has the same meaning as no studies
    • previously a decision made for template params since the query for all and no studies is the same
    • code should not be specific to how one specific table represents data
  • truncate labels for x or y axis display at X characters #160
    • how to truncate and show tooltip in plotly?
    • index of terms that are truncated (similar to wikipedia "sources" section)
  • can legend be pushed above/below plot instead of trying to fit it "on top" of the plot
    • plotly has a concept of xanchor and yanchor for the legend which allows for setting the legend position in relation to the plot
    • facebase asked for this for pie charts
    • new version of plotly app might handle this for us?
  • disable study selector instead of hide when study is in url parameters
  • open from iframe forces user to restart the changes they made to the selectors
  • When legend text is wrapped to a new line, the square in the legend to the left of the text should be top aligned

Other plot changes:

  • Finalize logging in plot app (issue Add logging actions to Plot app #115)
  • Further link support in plot app (issue Allow for links in plot app #121)
    • hovertemplate_display_pattern
    • legend_markdown_pattern for histogram and dot
    • graphic_link_pattern for dot
  • templateParams in chart.ts needs to have functions that get values from state and for changing state
    • gene and study need to access and change these properties
  • if data is null, we use N/A
    • if data is empty string "", use Empty instead so the label isn't "missing"
  • help menu/link
    • where should this go?
    • in list of buttons that plotly has in upper right corner?
    • /user-docs/plot-functionality.md created

Probably won't be addressed

  • Just like other deriva web apps, the data should be fetched from the URL parameters. Need to support multiple plots from same URL. Currently that is happening via config file (issue Plot App  #73)
    • May not be relevant anymore since we support multiple charts that make requests to very different schema:table paths
@jrchudy jrchudy added enhancement New feature or request Epic labels May 4, 2023
@jrchudy jrchudy self-assigned this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Epic
Projects
None yet
Development

No branches or pull requests

1 participant