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

Print current data value along with the legend #30

Open
ulkesh11 opened this issue Jul 8, 2019 · 3 comments
Open

Print current data value along with the legend #30

ulkesh11 opened this issue Jul 8, 2019 · 3 comments

Comments

@ulkesh11
Copy link

ulkesh11 commented Jul 8, 2019

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

@phdv61
Copy link

phdv61 commented Jul 9, 2019 via email

@ulkesh11
Copy link
Author

ulkesh11 commented Jul 9, 2019

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
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants