Hello, I am new to this and need some help with a little project.
In php I am looking to create a table with a certain amount of boxes / columns (like a chart) and have certain colours.
This is what I am trying to do (example):-
Product: abc123
Current Qty: 7
Target Qty: 12
Red Qty Between: >0 & <5
Amber Qty Between: >5 & <7
Green Qty Between: >7 & <10
Blue Qty Between: >10
I would like the php code to generate 12 boxes (with a small gap between each one) and each with a number
The first 5 boxes are to be filled in red
the 6th & 7th box is to be filled in amber
as the current qty is 7 then the remaining boxes are to be filled in white
As the current qty changes then the boxes will be filled in accordingly. If the current qty exceeds 10 then the boxes are to be filled in blue
Other products (about 15 in total) also need to be displayed but will each have their own values for the Current, Target, Red, Amber, Green & Blue boxes.
I hope this helps? I was looking to create a stacked barchart with a gap within each value and no axis, but thought it might be easier just to build a table.
I think this will be an easy bit of code for an experienced php developer to do but I am really struggling.
Many thanks,
Si
In php I am looking to create a table with a certain amount of boxes / columns (like a chart) and have certain colours.
This is what I am trying to do (example):-
Product: abc123
Current Qty: 7
Target Qty: 12
Red Qty Between: >0 & <5
Amber Qty Between: >5 & <7
Green Qty Between: >7 & <10
Blue Qty Between: >10
I would like the php code to generate 12 boxes (with a small gap between each one) and each with a number
The first 5 boxes are to be filled in red
the 6th & 7th box is to be filled in amber
as the current qty is 7 then the remaining boxes are to be filled in white
As the current qty changes then the boxes will be filled in accordingly. If the current qty exceeds 10 then the boxes are to be filled in blue
Other products (about 15 in total) also need to be displayed but will each have their own values for the Current, Target, Red, Amber, Green & Blue boxes.
I hope this helps? I was looking to create a stacked barchart with a gap within each value and no axis, but thought it might be easier just to build a table.
I think this will be an easy bit of code for an experienced php developer to do but I am really struggling.
Many thanks,
Si