Since you're talking about a line chart it sounds like all you need to do is change the Orientation on the Style tab. If that's not the case I obviously don't understand what you want. Can you show what the result should look like? Also are cost1, cost2 and cost3 fields? If they are expressions can you post the expressions too.
Ok, your data needs to be in the form
Project, Cost, Value
A, Cost1, 1
A, Cost2, 5
Then in your chart you add Cost as first dimension, Project as second dimension and sum(Value) as expression.
If your data is in the form you posted above then you first need to transform it in the script with the crosstable function
Project, Cost1, Cost2, Cost3