Hello Vikas,
this is not a limitation of the Path Data functionality. In order to have straight vertical lines you have to provide correct coordinates for the start and end position of the respective line segments. Use the method AddLine() to add a single line segment to the path. For example, the following code creates a path with rectangle shape:
// Here I assume the path will store up to 10 line segments.
Path.InitSubPath( 0, 10 );
// Start position of the path
Path.Begin( 0, 0.0, 10.0 );
// ... and the sequence of following line segments
Path.AddLine( 0, 100.0, 10.0 );
Path.AddLine( 0, 100.0, 110.0 );
Path.AddLine( 0, 200.0, 110.0 );
Path.AddLine( 0, 200.0, 10.0 );
Path.AddLine( 0, 300.0, 10.0 );
This is the result in Embeded Wizard:

I hope it helps you further.
Best regards
Paul Banach