1. OpenREM
  2. OpenREM
  3. OpenREM
  4. Issues

Issues

Issue #205 resolved

link to data from histogram tooltips doesn't work properly at the moment

David Platten
created an issue

Links in mean DAP and DLP histogram plots take the user to more days than they should.

Comments (14)

  1. David Platten reporter

    I've looked at this again this morning and can't see a problem. It may be that my browser was using a cached JavaScript file for the plots. It would be good if someone else checked to see if they think the links from the histogram tooltips take you to the correct data.

    Thanks.

  2. David Platten reporter

    It's not possible to link from the CTDIvol histograms as there is no filter defined for CTDIvol at the moment. If I added a new filter then yes, it would be trivial to add the links. I was a little reluctant to add CTDIvol filters as the filter list is already a little congested on the CTfiltered.html page. Do you know if it is possible to make a filter hidden on the page, but still be active?

  3. David Platten reporter

    There is a problem with the links from histogram tooltips if the protocol or study name includes an ampersand (&) symbol. This is escaped to "&", but not then unescaped in the underlying views.py code, preventing the database filtering from working.

  4. David Platten reporter
    • changed status to open

    There is a problem with the links from histogram tooltips if the protocol or study name includes an ampersand (&) symbol. This is escaped to "&", but not then unescaped in the underlying views.py code, preventing the database filtering from working.

  5. David Platten reporter

    I think it may be more elegant, and still work, if I processed the text contained in requestResults that is sent to view.py rather than in the chart JavaScript. Something like the code below may work.

    import HTMLParser
    import urllib
    
    myString = "Head & spine"
    h = HTMLParser.HTMLParser()
    myStringUnescaped = h.unescape(myString)
    print myStringUnescaped
    
    myStringRecoded = urllib.quote_plus(myStringUnescaped)
    print myStringRecoded
    
    # Or in fewer lines
    myStringNew = urllib.quote_plus(h.unescape(myString))
    print(myStringNew)
    

    This will also catch other possible problems that I haven't encountered yet.

  6. David Platten reporter

    I don't think my earlier idea about unescaping & in python is a good one. I can't seem to get it to work, so I'm leaving it as it is - a simple text replace in the JavaScript of each chart

  7. Log in to comment