You can use frequency, it is in the bottom right corner of the graph builder. Here the sum of frequency for one and two are the same even though they do not have the same number of rows:
Names default to here(1);
dt = New Table( "Untitled",
Add Rows( 3 ),
Set Header Height( 46 ),
New Column( "Size",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 0.5, 0.5] )
),
New Column( "Topic", Character, "Nominal", Set Values( {"One", "Two", "Two"} ) )
)
dt << Graph Builder(
Size( 440, 239 ),
Show Control Panel( 0 ),
Variables( Y( :Topic ), Frequency( :Size ) ),
Elements( Mosaic( Y, Legend( 5 ) ) )
);