Grasshopper

algorithmic modeling for Rhino

[solved] how to add text label for data points/cells on 3D chart and bar chart?

I wonder if there's a way to add text label for data points/cells on 3D chart and bar chart.

Sun path diagram can do this as the sun information and sun position can be used for the text tag component ...

Thanks!

Views: 3210

Replies are closed for this discussion.

Replies to This Discussion

Hi Grasshope, You can do this in a similar way. To find the points you can use deconstruct mesh, and add the text that you need to add using Grasshopper's Text Tag components.

Thank you, Mostapha!

However, the points get from deconstruct mesh a 3D chart or bar chart are too many for text annotation (see image below, the value for that single bar is shown all the 4 corners of the mesh of the bar).

Plus, the text is behind the bar mesh geometry and it's difficult to read without turning off the preview of the mesh.

I wonder if the 3D chart and bar chart components can add a "value annotation position" option to define a single point for each mesh to position its value if needed.

... the GH file

Attachments:

Grasshope,

See attached. Instead of the decompose i used the Area component and it's center output.

-A.

Attachments:

Thanks, Abraham!

Good to know the area component can get the centroid of a geometry!

My approach in the attached GH file is to use one of the four corners of a mesh as an anchor to position the text, and I add a few more components for rounding the decimal number of the values.

However, this only seems to work for bar chart, not for 3D chart ...

Advices are appreciated!

Attachments:

Check the attached. A hybrid of yours and mine.

Didn't solved the 3DGraph ...

Also check the blue group.

-A.

Attachments:

Thanks a lot, Abraham! Learned a lot from your approach!

Grasshope,

I Implemented an output for some label points if you want to generate these types of text labels (see attached file and the new component on the github).

-Chris

Attachments:

This is excellent Chris!

In the meantime i've found a couple of issues, if you don't mind.

The dataLabelPts output doesn't take into account the _basePoint_ input.

If you have more than one variable to plot as column (stacked or not) then the location of the text is less "accurate" (this one is me being picky. Sorry).

Thanks,

-A.

Abraham,

Thanks for finding the bug with the basePoint.  I fixed it in the attached GH file.

I am not sure if I understand your comments about the text location for multiple bars.  This is what it should look like:

The attached GH file shows you how to navigate the data tree structure to ensure it displays like this.

-Chris

Attachments:

Thanks Chris. This is very nice!!

One question, not related to the thread ...

One of the input data i' connecting is the AirTemperature calculated in the simulation. When i want to graph with the comfort band\addaptive i get an error (orange component), saying that this is not allowed input. Only annual DBT or Effective Temperature. Isn't the latter the AirTemp?

-A.

Abraham, Thanks for letting my

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service