6

I'm trying to create a label in QGIS that is formatted similar to the "table" styled yellow labels in the image below. The image is from a map created in AutoCAD. I would like the labels linked to my attribute table which includes all that info.

Table style label

I tried to use an expression to create a custom label, but it is quite limiting when it comes to formatting. Does anyone have any ideas on how I could do this?

Name || ': ' || Depth_1 || '\n' || 'CL  ' || cl ||'(mg/L)' || '\n' || Name || ': ' || Depth_2 || '\n' || 'S04  ' || s04 ||'(mg/L)'

My attempt at making "table label"

Matt
  • 16,843
  • 3
  • 21
  • 52
Jesse Lawrence
  • 221
  • 2
  • 4
  • It looks like you've already solved your problem as well as QGIS will allow. One suggestion, would be to add some spaces to the shorter lines so the underline formatting is the same length on each line. And you could add the vertical line symbol | to imitated table cell dividers. – csk Feb 13 '18 at 19:49
  • Yes, you will need to use dynamic SVG see these answer for full explanation on how to implement this : https://gis.stackexchange.com/questions/380964/qgis-labels-with-html-formating and https://gis.stackexchange.com/questions/379437/use-text-diagram-for-labeling-in-qgis – J.R Feb 11 '22 at 16:50
  • Hello - i know this is an old question, but I see the new QGIS 3.28 allows for HTML formating of labels. I am not familiar with HTML - but wondering if this would allow for labels to be made like in the original question. For reference the data for each label is in a spreadsheet - or could be added to the point layer attribute data. Thanks! – Jesse Lawrence Jan 12 '23 at 19:35

0 Answers0