Skip to content

Graph Doesn't Render Properly in Chrome #660

Answered by marco-doerig
platramos asked this question in Q&A
Discussion options

You must be logged in to vote

You can use rect() which will render correct in any browser. Adapt the following script to your needs (I just changed it quickly to see if it works):

for segment in convo_segments:
    utterance_length = (float(segment['end']) - float(segment['start']))
    convo_length = convo_segments[-1]["end"]

    width_of_segment = utterance_length / float(convo_length) * page_width

    if segment['speaker'] == '0':
        pdf.set_fill_color(255, 138, 91)
        y_axis_start = y_axis_starting_point - line_height
    else:
        pdf.set_fill_color(8, 61, 119)
        y_axis_start = y_axis_starting_point

    pdf.rect(x=conversation_cursor, y=y_axis_start, w=width_of_segment, h=line_height, style…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@platramos
Comment options

@Lucas-C
Comment options

@platramos
Comment options

@gmischler
Comment options

@Lucas-C
Comment options

Comment options

You must be logged in to vote
1 reply
@platramos
Comment options

Answer selected by platramos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants