• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Dashlet Bar Graph

    While creating CP-level dashlets, I was successful in setting up pie charts, but I am having difficulty with setting up a bar graph. For some reason, all of the data are being grouped to the left side of the graph. Below are a couple screenshots. Any ideas on how to configure the bar graph?

    I used the following documentation as a guide: https://openspecimen.atlassian.net/wiki/display/CAT/Dashboard+changes+using+query


    Hi @Matthew_Marcetich,

    Can you please share screenshots of following?

    1. Results view of the underlying query used for creating dashlet?

    2. Pie chart representation of dashlet data?

    Thanks,
    Vinayak

    Hi @vpawar

    1. A portion of the results view is below.
    2. The first pie chart is the pie chart of Age at Dx. The second pie chart is a “good” pie chart (using a different query for different data).

    I wonder if the issue for Age at Dx is related to the number of data points (and, if so, if there is a better way to display the data).

    Hi Matt,

    The bar chart grouping to the left side of the graph is a bug. This happens if there is a null value. Can you please add a condition in your query to show only values having ‘Age at Dx’ > 0, that should solve the issue. If you see the results view in your screenshot #1, the first row ‘Age at Dx’ is blank/null. We will fix this in next version.

    Thanks,
    Poornima

    Hi @Matthew_Marcetich,

    Further to what @pgovindrao said, it is best to create age groups (0-10, 11-30, etc) and show the patient counts for each group using bar/pie chart. This can be done using SQL based dashlet configurations. For more details, please create a support ticket.

    Thanks,
    Vinayak

    Hi @pgovindrao

    Thanks for the information. I modified the query, and the bar graph is working. Please see screenshot below.

    @vpawar

    This is good to know, and I think that is a good approach. We will look into the SQL-based dashlets. Is there any documentation available that we could use as a guide?