How to set Angle Of Callout Wedge Rectangle (C# .NET)

Hi,


how to format arrow of Callout Wedge Rectangle shape in aspose slides
java ?
Here i want to set the angle of the Wedge Point .

Can you please help me with some example ?


Thanks

Hi,


I have observed your comments. Can you please share sample what you trying to achieve so that i can further investigate.

Best Regards,

Hi ,


I have attached two files . One is Generated by us . Other is as we want output .
Can you please help us to get this ?


Thanks

Hi,


I have observed your comments. Can you please share source code for investigation so that i can help you out.

Best Regards,

Hi Partik,

I have observed the requirements shared by you and like to share that Aspose.Slides generated Pie chart with labels having callouts. I suggest you to please visit this thread link for reference. I am hopeful the shared information will be helpful.

Many Thanks,

Hi,


Thanks for your reply.
But I am not focusing to implement the pie chart.
I want that callout Wedge Rectangle Angle Point inside the Pie Chart ?
can you help me out for that ?


Note : You can Check the attachment in previous tag.


Thank You.

Hi,


I have observed your comments. I have shared a piece of code. This will help you to achieve requirements.
Please share feedback with us if there is still an issue.

Presentation pres = new Presentation();


ISlide slide = pres.getSlides().get_Item(0);

IShapeCollection shapes = slide.getShapes();

IAutoShape shape = shapes.addAutoShape(ShapeType.CalloutWedgeRectangle, 20, 250, 300, 200, true);

shape.getAdjustments().get_Item(0).setRawValue(8500);

shape.getAdjustments().get_Item(1).setRawValue(-120850);


pres.save(“sharePres.pptx”, SaveFormat.Pptx);

Best Regards,

Hi Adnan,


Thank you for giving solution .
It is working fine as i wanted.


Thank you.

Hi,


You are very welcome. Please share if there is any issue.

Best Regards,

This is exactly what is needed to position the Angle Point. But how are the adjustment values 8500 and -120850 computed? Our use case is that we wish to position the Angle Point at a given position in the same coordinate system as in the shape definition.

@AdVanOmmen,

I have observed your comments. I like to inform that IAdjustValue also has AngleValue property. This property "Returns or sets value, interpreting it as angle in degrees. Please share feedback with us if there is still an issue.

@AdVanOmmen
The AngleValue property may be handy for other usage. We did solve our case for practical purposes by varying the values and observing how the wedges change. For positions of the wedge endpoint relative to the middle of the callout shape we got

IAutoShape shape = shapes.addAutoShape(ShapeType.CalloutWedgeRectangle, x, y, width, height);    
shape.getAdjustments().get_Item(0).setRawValue((long) (getXCallout() * PP_ADJUSTMENTS_FACTOR  / shape.getWidth()));
shape.getAdjustments().get_Item(1).setRawValue((long) (getYCallout() * PP_ADJUSTMENTS_FACTOR / shape.getHeight()));

Where

private static final double PP_ADJUSTMENTS_FACTOR = 99118;

And the xCallout and YCallout are the relative positions.

We would welcome an in depth explanation on how the raw values determine the exact position the wedge will point to.

@nlpwc,

I have observed your comments. I like to inform that IAdjustValue also has AngleValue property. This property "Returns or sets value, interpreting it as angle in degrees. Please check below calculation.

  1. RawValue == AngleValue*60000
  2. AngleValue == RawValue/60000
  3. AngleValue value interpreting as angle in degrees
    For example:
    -120850/60000=-2.014166
    8500/60000=0.14166

Please share your feedback with us if you need more specific and detailed explanation about position of the wedge.

This example makes clear that what is designated as AngleValue is just a scaled version of RawValue.
I was mistakenly assuming that this AngleValue was what its name suggests, namely that it was the direction of the callout arrow in degrees. (Typical values would then be 45.0 for a diagonal angle of 45 degrees.)

Given that i create a callout at position (100, 100) with shape dimensions width = 100, height = 50.
When my need is that the callout should end at the position (300, 200), how exactly should I set the IAdjustValues

@AdVanOmmen,

I have observed your comments. A ticket with ID SLIDESJAVA-36619 has been created in our issue tracking system to further investigate to help you out in your query. This thread has been linked with issue so that you may be automatically notified once detailed feedback is shared by our product team.

where i can see this ID?

@ximoon,

You don’t have access to our internal issue tracking system. You may observe the status of the associated issue on bottom of page.

Hello,I want to know what is xCallout mean?I want make my CalloutWedgeRectangle connect to another shape, Can I use this way?Thanks.

Can u tell me what is xCallout? Can u show me code?

@ximoon,

I like to inform this is user functions for calculation of callouts. Please check following code snippet.

IAutoShape shape = shapes.addAutoShape(ShapeType.CalloutWedgeRectangle, x, y, width, height);
shape.getAdjustments().get_Item(0).setRawValue((long) (getXCallout() * PP_ADJUSTMENTS_FACTOR / shape.getWidth()));
shape.getAdjustments().get_Item(1).setRawValue((long) (getYCallout() * PP_ADJUSTMENTS_FACTOR / shape.getHeight()));