# About text() function

**URL:** <https://discourse.processing.org/t/about-text-function/22440>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [July 7, 2020, 6:44am UTC](https://discourse.processing.org/t/about-text-function/22440 "2020-07-07T06:44:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SouSageYa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sousageya/32/9819_2.png) [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Post date:** [July 7, 2020, 6:44am UTC](https://discourse.processing.org/t/about-text-function/22440/1 "2020-07-07T06:44:52Z")

</div>

![Allah Allah 2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e93fd2feb1328e0eede76ac7c42ab461d16d3b5b.png) ![Allah Allah](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bfab0d76bda4e49aa06f3732d7556bb85127baf2.png)

```auto
//Pressure Chart Value
fill(#D6CDCD);
stroke(#000000);
rect(260,325,200,40,50);
fill(#FF301E);
text(f[7],340,110);
//Height Chart Value
fill(#D6CDCD);
stroke(#000000);
rect(260,285,200,40,50);
fill(#FF301E);
text(f[8],380,150);
//Voltage Chart Value
fill(#D6CDCD);
stroke(#000000);
rect(260,245,200,40,50);
fill(#FF301E);
text(f[9],380,190);

```

I cant see those texts where are they.Their X Y Axis locations are true but I didn’t understand where are they

---

<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:** [July 7, 2020, 7:28am UTC](https://discourse.processing.org/t/about-text-function/22440/2 "2020-07-07T07:28:44Z")

</div>

Green text under the blue boxes?

---

<div class="post-metadata">

**Author:** ![SouSageYa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sousageya/32/9819_2.png) [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Post date:** [July 7, 2020, 8:20am UTC](https://discourse.processing.org/t/about-text-function/22440/3 "2020-07-07T08:20:31Z")

</div>

They are red actually you can see it in the first photo. Even if they are green I would be able to see them because boxes are not blue they are literally grey

---

<div class="post-metadata">

**Author:** ![SouSageYa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sousageya/32/9819_2.png) [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Post date:** [July 7, 2020, 11:16am UTC](https://discourse.processing.org/t/about-text-function/22440/4 "2020-07-07T11:16:43Z")

</div>

So I guess no one will help me

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 7, 2020, 11:39am UTC](https://discourse.processing.org/t/about-text-function/22440/5 "2020-07-07T11:39:21Z")

</div>

Hello,

> [@SouSageYa](#):
>
> So I guess no one will help me

You did not ask for help.

You just made a statements:

`About text() function`

> [@SouSageYa](#):
>
> I cant see those texts where are they.Their X Y Axis locations are true but I didn’t understand where are they

Can someone please @SouSageYa ?

Sure! Since you ask so nicely.

I added some code so I could test what you provided:

```auto
void setup()
  {
  size(500, 500);
  textSize(24);
  
  //Pressure Chart Value
  fill(#D6CDCD);
  stroke(#000000);
  rect(260,325,200,40,50);
  fill(#FF301E);
  text("test",340,110);
  
  //Height Chart Value
  fill(#D6CDCD);
  stroke(#000000);
  rect(260,285,200,40,50);
  fill(#FF301E);
  text("test",380,150);
  
  //Voltage Chart Value
  fill(#D6CDCD);
  stroke(#000000);
  rect(260,245,200,40,50);
  fill(#FF301E);
  text("test",380,190);
  }

```

This is a snippet of code; how this will behave in the larger context of your project is not known.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a611d27cb7e19574a9f9307a05a7c0dfcf4a9507.png)

`:)`

---

<div class="post-metadata">

**Author:** ![SouSageYa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sousageya/32/9819_2.png) [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Post date:** [July 7, 2020, 5:19pm UTC](https://discourse.processing.org/t/about-text-function/22440/6 "2020-07-07T17:19:20Z")

</div>

Actually I didn’t ask this forum to write the code or something. I just wanted to learn why are those texts are being hidden at the back of those boxes even the other ones are not. like the code/photo that you attached. Thanks @glv

---

<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:** [July 7, 2020, 5:25pm UTC](https://discourse.processing.org/t/about-text-function/22440/7 "2020-07-07T17:25:57Z")

</div>

I can’t run your code.

It is vital

- that you say fill BEFORE the text that uses the color and
- that you draw the text AFTER the rectangle it is upon.

Maybe you can provide a MCVE?

Thank you!

Chrisir

---

<div class="post-metadata">

**Author:** ![SouSageYa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sousageya/32/9819_2.png) [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Post date:** [July 11, 2020, 8:15pm UTC](https://discourse.processing.org/t/about-text-function/22440/8 "2020-07-11T20:15:24Z")

</div>

Its about the source code I guess when I tried to code those texts somewhere else it worked thanks for everything much love.
