Jump to content
JChartFX Community
  • 0

Completion of Plotting chart event


niravbhatt

Question

Hello,

 I am a licensed JChartFX user.

I am facing problem on shading charts/ making sections in chart when on very huge data. I want to shade chart after plotting entire chart. Temporary it is on time out but it is not good approch.

I want to ask that is there any event that I can get line plotChatCompleted or complete chart event so I can fire shading chart function.

 

Thanks in advance

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks @JuanC

I saw comment #672 in forum. We need kind of that solution.
let me clear this way.

My requirements are,
1. Plotting a graph
2. Make some section according to some value and paint that section

We plotted a graph and made section in this way

chart1.create(document.getElementById("xychart" + xyChartData.widgetId));       
   //initialize rule builder  
  $timeout(function () {
      ApplyRuleBuilderOnBarLineUniversalAreaChart(chart1, xyChartData.widgetNumber);          
 }, 2000);

 

function ApplyRuleBuilderOnBarLineUniversalAreaChart(Chart1, widgetID) {

        section = new cfx.AxisSection();
        Chart1.getAxisY().getSections().add(section);
        section.setBackColor("#ffb2b2");
        if (ruleList[Index].compareType == 1) {
            section.setFrom(someNumber);
            section.setTo(MaxPosition);
        } else {
            section.setFrom(someNumber);
            section.setTo(0);
        }
        section.getGrids().getMajor().setVisible(false);
        section.getGrids().getMinor().setVisible(false);
        section.getGrids().getMinor().setTickMark(cfx.TickMark.None);
        section.getGrids().getMajor().setTickMark(cfx.TickMark.None);
        section.setTextColor("#ffb2b2")
        '
        '
        .
}

I always need to change timeout when chart plot late due to large data or network problem. Meanwhile ApplyRuleBuilderOnBarLineUniversalAreaChart this function execution has no meaning.
We want a event which confirms that chart plotting is completed and then we can execute function for create section to that particular chat.

Thanks in advance 

Link to comment
Share on other sites

  • 0

Have you tried using the render event as I showed on my post? It should give you the feature that you need.

I do not understand why you cannot invoke the ApplyRuleBuilderOnBarLineUniversalAreaChart before the chart create call, the way you are doing it now the chart will be painted twice (one without the axis section and one with) and that may be visible to the user.

Is there a particular reason why you need to wait for the chart to be rendered to create the axis section?

But again, if that is what you need you should be able to use the render event.

Regards,

JuanC

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...