ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  How to produce vectors with no head (and, even better, arrows with a full fletching and no head...)
Posted by Daniel on Feb-22-2016 22:02
Hi Peter,

I am trying to get vectors on top a scatterplot with some specific vector information added. The design includes a classical arrow and an additional one with no "head" of any kind, and, possibly even better one with fletching and no head as well.

I just do succeed at dropping the head, let alone add some gracious fletching! When I drop the "head" with a zero-or-something setArrowhead or setArrowHead2 the line is also dropped.

The error is certainly on my side. Is there a way to produce the output? I do not mind adding two vector layers to build the arrows that are wished for. But I'm stuck at this time:(

Regards

Daniel

  the image produced
Posted by Daniel on Feb-22-2016 22:07
Attachments:
The head is hidden by the point but is it present. We want it dropped:)

Regards

Daniel
clumsy_vectors.png

  Re: the image produced
Posted by Peter Kwan on Feb-23-2016 02:42
Attachments:
Hi Daniel,

I have tried myself using by modifying the "Vector Chart" sample code to use:

Set layer = c.addVectorLayer(dataX, dataY, dataR, dataA, cd.YAxisScale, &H0000cc)
Call layer.setArrowHead(0)
Call layer.setLineWidth(10)

The resulting arrows contain no arrow head, and just a thick arrow stem. So they are arrows without arrow head, and is essentially a long and thin rectangle.

To create an arrow stem with a fletching, you may use a custom polygon as the arrow stem. For example:

shape = Array(-20, 0, 0, 20, 20, 0, 40, 0, 15, 30, 15, 100, -15, 100, -15, 30, -40, 0)
Call layer.setArrowStem(shape)

Hope this can help.

Regards
Peter Kwan
vector_stem.png

  Re: the image produced
Posted by Daniel on Feb-23-2016 16:15
Attachments:
Hi Peter,

The layer.setArrowHead(0) instruction works beautifully in terms of output (see second piece attached)....But this very instruction currently generate runtime errors - the COM object is aborted - in a COM-based interpreter-based environment on WIN32 ? la VB6 when passing a ZERO parameter.

I have temporarily replaced this very API call (setArrowHead(0) - non null values do operate properly by way. A negative value - setArrowHead(-1) - did the trick as well. Possibly a bug. That's why I want to share. Bugs are quite a rarity with CD indeed!

Daniel
with_heads.png
with_no_heads.png

  Re: the image produced
Posted by Peter Kwan on Feb-24-2016 01:14
Hi Daniel,

I will try to reproduce the problem. Would you mind to inform me which version of ChartDirector you are using?

Regards
Peter Kwan

  Re: the image produced
Posted by Daniel on Feb-24-2016 02:24
>I will try to reproduce the problem.

Great

>Would you mind to inform me which version of ChartDirector you are using?

I send you the information as email.


Daniel