jQWidgets Forums
jQuery UI Widgets › Forums › Chart › empty point display
This topic contains 8 replies, has 2 voices, and was last updated by rmzq 4 years, 1 month ago.
-
Authorempty point display Posts
-
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
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?lightBest Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi 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.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 HristovjQWidgets team
https://www.jqwidgets.comHi 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.
Hello rmzq,
Thank you for this example.
I would like to suggest you try to use thebeforeLoadComplete
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 HristovjQWidgets team
https://www.jqwidgets.comHi 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?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 HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
Thank you very much Hristo for your help and for solving my questions.
-
AuthorPosts
You must be logged in to reply to this topic.