How to set a FlexChart's Min/max after data loaded

Posted by: ppaska on 17 April 2018, 2:52 am EST

    • Post Options:
    • Link

    Posted 17 April 2018, 2:52 am EST

    Hi,

    This is a follow up on a topic I’ve raised some time ago (https://www.grapecity.com/en/forums/wijmo/flexchart--add-x-and-y-mar), but I still don’t have the answer.

    What event I should use to update min/max here

    {

    let yRange = this.calculateActualRangeWithMargins(data, margin)

    this.chartCtrl.axisY.min = yRange.minValue;

    this.chartCtrl.axisY.max = yRange.maxValue;

    this.chartCtrl.invalidate()

    }

    I tried “rendered”, but it doesn’t work.

    Appreciate your help.

    Pavlo

  • Posted 18 April 2018, 5:35 pm EST

    Hi Pavlo,

    We are sorry for the inconvenience caused.

    You have various options to do so including:-

    ->using $watch (provided by angularJS)

    → using rendered event (provided by FlexChart)

    ->initialized event (provided by WjFlexChart)

    Here is an example implementing all the above methods :- http://jsfiddle.net/odzufy9f/

    Notice, how min/max(axisX) is different from the normal chart.

    ~Manish

Need extra support?

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

Learn More

Forum Channels