How toset the width and height of Rectangle anno according to the data points

Posted by: malishin on 9 December 2020, 3:11 am EST

    • Post Options:
    • Link

    Posted 9 December 2020, 3:11 am EST

    How to set the width and height of Rectangle Annotation according to the data points in flexChart,

    For example, if the location is set to (30,30), and positon is set to center,

    I want to set the width to 20 and the height to 10, so that the topleft corner always keeps (50,40),and the bottomright corner keeps (10,20),Even if the window size changes or I drag the Axis.Scrollbar to zoom the flexchart

    it seems that it can only be set to a fixed pixel value now

  • Posted 9 December 2020, 11:47 pm EST

    Hi Malishin,

    Yes, you are right that annotation accepts Height/Width in pixel values.

    However, we can manually implement the same to allow annotations to accept Height/Width based on data points. We can use FlexChart’s DataToPoint method and some calculations to achieve the same.

    Please refer to the same from the attached sample. (see Flexchart_AnnotationSize.zip)

    Best Regards,

    Kartik

    Flexchart_AnnotationSize.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels