jQuery UI Widgets Forums Chart empty point display

This topic contains 8 replies, has 2 voices, and was last updated by  rmzq 1 week, 5 days ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • empty point display #114973

    rmzq
    Participant

    I would like to know if it can be done that when my graph has empty points I could make that connection between those points the color of the line is different

    empty point display #114982

    Hristo
    Participant

    Hello rmzq,

    Please, clarify it.
    I think you started a similar discussion on this page:
    https://www.jqwidgets.com/community/topic/empty-point-display/
    About what you mentioned I would like to suggest you look at this demo:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/javascript_chart_series_conditional_colors.htm?light

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    empty point display #114987

    rmzq
    Participant

    Hi Hristo, thanks for answering, if I started that discussion, just don’t notice that it was in the general section.
    I already check the example you sent me and I have a detail when I put in the series the emptyPointsDisplay = “connect” and then I put the condition “return (isNaN (value))?” # 808080 “:” # FF6600 “;” in my colorFunction the connection line between those two points is not put, it leaves the two points empty as if I had put emptyPointsDisplay = “skip” and I don’t want that. But if I put emptyPointsDisplay = “zero” if I do the condition by putting the color line towards the empty point (NaN), what I do not want is that the empty point comes out but that only the connection comes out in a different color to differentiate that on that line there was an empty point between those points.

    empty point display #114991

    Hristo
    Participant

    Hello rmzq,

    I would like to ask you for one simple example that demonstrates your case (in jseditor or in jsfiddle).
    Also, you could add additional information if you think it could be useful.
    When I reproduce your case I will try to provide you a solution.
    I look forward to hearing from you.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    empty point display #114998

    rmzq
    Participant

    Hi Hristo,

    Here is a link for you to see the demonstration:
    http://jsfiddle.net/rmzq09/sj5p3r2w/1/

    As I told you, if I do not put the condition of the colorFunction if it comes out with a connection between the empty points, but if I put the condition and put the emptyPointsDisplay: ‘connect’, I do not get the connection but it removes it and if I put emptyPointsDisplay: ‘zero’, if it makes me the condition and colors the line. What I want is for the connection between those empty colored dots to come out.

    empty point display #115004

    Hristo
    Participant

    Hello rmzq,

    Thank you for this example.
    I would like to suggest you try to use the beforeLoadComplete callback to handle this.
    Please, take a look at this example:
    http://jsfiddle.net/txhi/c78x9jht/
    Also, you could try to use a smarter approach (as you add additional datafield as a meta-data and when there is marked with value for “NaN” item then set the desired color).

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    empty point display #115011

    rmzq
    Participant

    Hi Hristo,

    Thanks for your example and for solving the doubts, if I am using the beforeLoadComplete in my project.
    Only one last question, you can check the following example:
    http://jsfiddle.net/rmzq09/rv0mbck5/17/
    The question is if I have several empty points, will I have to use the beforeLoadComplete to obtain the empty points and start doing operations to put values ​​to those empty points according to the points that if they have as you did in the example?

    empty point display #115014

    Hristo
    Participant

    Hello rmzq,

    The idea of using this callback is to fill the gaps.
    You could choose suitable for you logic to do this.
    For example, you could add additional logic to check the next point (recursively).
    Add all empty points in one array and get the average value to fill them.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    empty point display #115015

    rmzq
    Participant

    Hi Hristo,

    Thank you very much Hristo for your help and for solving my questions.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.