# Trying to get number values to show

**URL:** <https://discourse.processing.org/t/trying-to-get-number-values-to-show/39529>\
**Category:** Coding Questions\
**Created:** [October 31, 2022, 8:28pm UTC](https://discourse.processing.org/t/trying-to-get-number-values-to-show/39529 "2022-10-31T20:28:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JHProcess](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@JHProcess](https://discourse.processing.org/u/JHProcess)\
**Post date:** [October 31, 2022, 8:28pm UTC](https://discourse.processing.org/t/trying-to-get-number-values-to-show/39529/1 "2022-10-31T20:28:52Z")

</div>

Hello Again! i have pushed my basic design to this point. My next question is trying to make the data values show up when the mouse has hovered over the rectangles.  
I attached a screenshot of the code working.

```auto
Table table;

void setup() {
  size(1200, 900);
  table = loadTable("Hopwood_Visualizing data_ Copy of ign_contesters.tsv", "header");
  println(table.getString(1, 0));
  println(table.getFloat(1, 1));
  textAlign(LEFT, CENTER);
  // println(table.getColumnCount());
  //println(table.getRowCount());
}

void draw() {
  background(255);
  fill(0);
  for (int d=0; d< table.getRowCount(); d++) {

    
    rectMode(CORNER);
    fill(0);
    text(table.getString(d, 0), 100, 25+ d*25);
    fill(0, 320, 612);
    text("Critic Score", 340, 20);
    fill(0, 320, 612);
    text("User Score", 425, 20);
    fill(2, 320, 612);
    text("Total Sold in Millions", 630, 20);

    fill(226, 120, 50, 50);
    rect(425, 25+ d*25, sqrt(table.getFloat(d, 1))*12, sqrt(table.getFloat(d, 1))*6);
    fill(220, 100, 50, 50);
    rect(340, 25+ d*25, sqrt(table.getFloat(d, 2))*18, sqrt(table.getFloat(d, 2))*6);
    fill(120, 200, 50, 50);
    rect(630, 25+ d*25, sqrt(table.getFloat(d, 3))*18, sqrt(table.getFloat(d, 3))*6);
  }
}

```

 ![Screen Shot 2022-10-31 at 4.28.00 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/2/d2704f05b746d522a4d9d850ad278d8fe7dc246c.png)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [November 1, 2022, 4:18am UTC](https://discourse.processing.org/t/trying-to-get-number-values-to-show/39529/2 "2022-11-01T04:18:49Z")

</div>

First you are changing the y height; bad.

I think that you only should change the width of the bars

Then check for all bars whether mouse is inside

Do this where you draw them

If inside display text()
