Returning the y value of a drawline - teechart

Is there any way to get the y value of a drawline. I can get the only start and end position.
I try to catch the chance when a candle of moving financial series breaks through a drawline.

You can do something as in the All Features\Welcome !\Chart styles\Standard\Line(Strip)\Interpolating line series included in the features demo in most TeeChart versions. This example is based in the interpolating examples I made here:
TeeChart VCL & Delphi: http://www.teechart.net/support/viewtopic.php?t=2828
TeeChart ActiveX * VB6: http://www.teechart.net/support/viewtopic.php?t=4161
If more specific information is required please let us know the TeeChart version you are using.

Related

GeoJSON not visible in output rendered by code using D3.js v3

I'd like to visualize a geojson file in the EPSG:4326 coordinate reference system using D3.js version 3. I'm aware it's better to use the newest version, but alas I'm restricted because of old software that doesn't support higher versions.
I wrote this code: https://bl.ocks.org/FrieseWoudloper/141945ce346639013ac1ced8e4c071b7
In the resulting output there is an SVG element with paths, but I don't see it. I think I have the translate and scale arguments wrong, but I don't know how to determine the right values. Could you please give me any directions on how to fix this?

AutoCAD script: Find drawing position

Forgive my ignorance. I'm a web developer tasked with integrating an app with AutoCAD and I have no experience with the software or CAD files in general.
I have hooked it up to A360 and the Forge APIs and now I'm looking to modify drawings using scripts uploaded to the Design Automation API. What I need to do is add part numbers and some other data generated by the app to the drawings. I have the following script I've managed to get working which is a very basic version of what I need to achieve.
; Add a label to a drawing
-mtext 0,300 400,310 App data
Tag No: P1234567
Created: 29/09/16
; Define Attribute
-attdef
i
P1234567
tag
-
0,200
10
0
; end
This script adds an MTEXT and ATTDEF to a drawing with a bit of basic data. What I want to do is position the labels at the bottom right of the drawing.
Is it possible to get the position of the drawing from somewhere so the script can figure out where the bottom right is? Ideally it needs to work no matter where the creator has positioned the drawing.
Bonus points: I'd also like to put this data into the drawing metadata somehow, would this be beneficial and how would be the best way to achieve this?
Thanks in advance.
If you would still like to do it in Modelspace, and you can control the drawings, it is possible to achieve this by finding the position of blocks with specific names.
Example: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-a-block-and-get-it-s-insertion-point/m-p/3309261#M302014

ZPL - how to right justify a bar code?

I am trying to right justify a bar code I am printing using ZPL from a .Net program. Here is my current code:
^FO10,50^FB500,1,0,R,0^AO,40,40^BY3^BCN,100,Y,N,N^FD1234567^FS^XZ
The Field Block seems to be ignored when working with a bar code, but for text it justifies it correctly. Any ideas?
Newer Zebra firmware supports a third parameter on ^FO and ^FT. If you want to right justify something, specify the right edge as the x parameter, and include a 1 as the third parameter.
^XA
^BY3
^FO85,30^GB500,450,3^FS
^FO100,50^BCN,30,Y,N,N
^FD>;12345678^FS
^FO100,120N^BCN,30,Y,N,N
^FD>;123456^FS
^FO100,190^BCN,30,Y,N,N
^FD>;1234^FS
^FO570,260,1^BCN,30,Y,N,N
^FD>;12345678^FS
^FO570,330,1^BCN,30,Y,N,N
^FD>;123456^FS
^FO570,400,1^BY3^BCN,30,Y,N,N
^FD>;1234^FS
^XZ
We had the same issue at our company. The barcode doesn't respond to the Field Block. Based on your example since you are using ZPL commands directly to generate your barcode (as opposed to an image of a barcode), you could do something similar to how we did. We know roughly how wide the barcode is going to be based on the data we write to it. So we created a method to determine the x-axis location of the barcode based on our also known label widths.
For example: We use the s4M printers and estimate the full label width to be about 780 dots wide. So in order to left/center/right justify, we take the rough barcode (estimated) width and calculate accordingly (left is set to xaxis = 0, center is set to xaxis = ((780 - barcodeWidth) / 2), and right justified would be xaxis = (780 - barcodeWidth). It isn't a perfect solution but is very close at least for our needs. You could certainly be more precise in your algorithm by looking at more barcode setting information like the data square size, columns, rows, etc... depending on your needs.
If you were to come up with a solution of generating an image of a barcode (which is what we are also trying to come up with now) then you should be able to easily get the width of the barcode image using build in .net graphics functionality.

Display image on TChart (Borland Delphi 7)

I have a TChart in my Borland Delphi 7 project. What I want to do is to use an image instead of point while plotting on chart. How can I do this?
I'm not sure to understand what do you exactly want to achieve.
See the TImagePoint series. Find an example at "All features\Welcome !\Chart styles\Other\Image Point"
See the BackWall.Brush.Image property. Find an example at "All features\Welcome !\Miscellaneous\Walls\Back Wall\Brush image". Note you may have to set the back wall gradient invisible to make the image appear.
These examples are included in the TeeChart compiled demo

Highlight a value on an axis

I would like to highlight a single value on an axis; similar to the way that stock charts display the live price on the axis.
You could use an annotation tool to show a textbox with the value and a color line tool if you also want to have vertical/horizontal line highlighting the value. However, both tools are only available with the Pro version, and these are two features that would be quite easy to achieve with custom drawing techniques at OnAfterDraw event.
Yeray Alonso
Steema Support Central

Resources