Flexchart Extra MajorGrid Line

Posted by: kun.leeing on 12 March 2020, 5:08 pm EST

  • Posted 12 March 2020, 5:08 pm EST

    Hi guys,

    Can I ask 1. Can we display MajorGrid line with displaying all the labels (currently it is only displaying the major ticks label)?
    2. Can we add another Axis to specifically display the Grid Line , eg. I want to put the MajorGrid line anywhere I want?

    Thanks.
  • Replied 15 March 2020, 3:54 pm EST

    Hi Kun,

    We were unable to understand your major grid requirements. Can you please provide some more information or a screenshot of your requirements?

    Regarding the second axis, if you wish to display the gridlines on your own custom locations, then I would suggest you use the Line annotation. Please refer to the sample link below:

    https://www.grapecity.com/wijmo/demos/Chart/Features/Annotations/purejs

    In the above sample, observe the Line annotation. You can draw as many lines as per your requirements and it will be easier to draw annotation then major gridlines.

    Regards,
    Ashwin
  • Replied 15 March 2020, 4:18 pm EST

    Thanks so much for the answer, Ashwin. It is very helpful.

    And sorry I did not make it clear for my question.

    Basically, the chart major gridline with specific units was the displaying effect I want
    if we could appoint the start point or offset for the first major line?

    And is it possible to display the ticks labels between the major gridlines instead of showing a gap?



    Thanks in advance.
  • Marked as Answer

    Replied 16 March 2020, 7:31 pm EST

    Hi Kun,

    We cannot provide a starting point to the major grid lines but we can provide the units between them. In your case, the X-Axis data is a date so the unit will be defined in days.

    Please try to use the following configuration in your X-Axis:
    theChart.axisX.minorGrid = true;
    theChart.axisX.majorGrid = true;
    theChart.axisX.majorUnit = 1;
    theChart.axisX.minorTickMarks = 'Cross';
    theChart.axisX.labelAngle = -90;

    Please go through the links below for the API reference of Axis class. This reference describes each of the properties and methods present in this class. You can find more about the properties used in the code snippet above.

    https://www.grapecity.com/wijmo/api/classes/wijmo_chart.axis.html

    Let me know in case you run into any issues.

    ~regards
  • Replied 19 March 2020, 2:41 pm EST

    Thanks, Ashwin. You are legendary!

    Cheers,
Need extra support?

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

Learn More

Forum Channels