Skip to content

Print current data value along with the legend #30

Open
@ulkesh11

Description

@ulkesh11

Is there a way to print current data value (in case of a time graph) along with the legend for each plot?

Activity

phdv61

phdv61 commented on Jul 9, 2019

@phdv61
ulkesh11

ulkesh11 commented on Jul 9, 2019

@ulkesh11
Author

Thanks for replying Philippe

Well, I wanted to know if this is already implemented and if some parameter needs to be enables to print current value. But looks like it is not.

I have modified single line in Graph.java to do this as follows

// Draw each legend entry
for ( int i = 0; i < this.numVars; i++ )
{
    this.parent.fill( this.colors[i] );
    this.parent.text((this.labels[i] + ": " + Double.toString(this.data[this.index-1][i][1])), this.posX + this.width - 10, textPos);
    textPos += ( labelSz + labelSz/4 );
    this.parent.stroke( this.colors[i] );
}
devinaconley

devinaconley commented on Aug 8, 2019

@devinaconley
Owner

@vacky11 - this feels like a useful feature. Would welcome a contribution if you open a PR with this enhancement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @devinaconley@ulkesh11@phdv61

        Issue actions

          Print current data value along with the legend · Issue #30 · devinaconley/arduino-plotter