Open sandydelhoute opened 1 year ago
I need a rotation label for axe X for barchart
I add two element for implementation rotation. I add enum options in Orientation
RightInclined, LeftInclined,
I change 'else if' to 'switch case' in function DrawLabel present in file drawhelper and i add the code case Orientation.RightInclined: { canvas.Translate(point.X, point.Y - (bounds.Width / 2) + textSize); canvas.RotateDegrees(45); break; } case Orientation.LeftInclined: { canvas.Translate(point.X - bounds.Width / 2 - textSize, point.Y + (bounds.Width / 2) - textSize / 2); canvas.RotateDegrees(-45); break; } example:
case Orientation.RightInclined: { canvas.Translate(point.X, point.Y - (bounds.Width / 2) + textSize); canvas.RotateDegrees(45); break; } case Orientation.LeftInclined: { canvas.Translate(point.X - bounds.Width / 2 - textSize, point.Y + (bounds.Width / 2) - textSize / 2); canvas.RotateDegrees(-45); break; }
It will be very great to be able to customize the orientation of the label
I need a rotation label for axe X for barchart
I add two element for implementation rotation. I add enum options in Orientation
RightInclined, LeftInclined,
I change 'else if' to 'switch case' in function DrawLabel present in file drawhelper and i add the code
case Orientation.RightInclined: { canvas.Translate(point.X, point.Y - (bounds.Width / 2) + textSize); canvas.RotateDegrees(45); break; } case Orientation.LeftInclined: { canvas.Translate(point.X - bounds.Width / 2 - textSize, point.Y + (bounds.Width / 2) - textSize / 2); canvas.RotateDegrees(-45); break; }
example: