Okay
  Public Ticket #2731656
Remove markers from spline chart
Closed

Comments

  • Dave started the conversation

    hi,

    I know hicharts offer the option to disable the markers on data points in spline/line charts - where do I do this in wpdataables?

    can anything from here help?

    https://stackoverflow.com/questions/14642779/highcharts-how-can-i-turn-off-the-points


    I will note that marker are automatically turned off when there are a lot of data points - 300 for example and turned back on if the chart has 50 data points - there must be  a limit in your code somewhere - please let me know how do I change this setting?

  • [deleted] replied

    Hi Dave

    Thank you for reaching out to us.

    That is default behavior of charts engine, but if you need some custom solution you can check in our documentation about wpDataCharts callbacks

    • Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts APIHighcharts API and Chart.js API
    • All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in Support help center). Huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and google will search only that website). Also, a lot of examples of charts, chart settings and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
    • Please note that using hooks or wpdatatable and wpDataChart callbacks requires certain level of programming skills and included support refers only to advice.


  • Dave replied

    thank you for the answer....if there a way to disable markers in all charts? do you know where I can set this in your code???? it should not be difficult


    hi charts has this option:


     plotOptions: {
            series: {
                marker: {
                    enabled: false
                }
            }
        },


  • [deleted] replied

    You are most welcomesmile.png

    We don't have an example of a callback that you can use, but if you found that in Highcharts' API, you could use it with our callbacks. If I had an example, I would've gladly share it with you. Writing custom callbacks is not included in the provided support for our plugin, so I can't help you with that, but please feel free to check our FAQ section.

  • Dave replied

    look...can this be changed insidev your plugin??? this is a frquent request..you have not helped anyone on this before? i paid for support can you try to help me amd try to find a similar calkback script??

  • [deleted] replied

    Hi Dave

    I am really sorry I am not able to help you out with this. The examples you see in our FAQ section came from our customers who have paid for this customization so we included this in our documentation.

    We used to offer writing custom solutions but our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in near future.

    But we can recommend these services for customization:

    https://codeable.io/?ref=l1TW1

    https://wpkraken.io/?tms-plugins

    They do develop such solutions, so can you please send your inquiry to them?

    As mentioned before writing custom callbacks is not included in the provided support.

  • Dave replied

    this is not a custom solution but simple modification of core parameters....where in your documentation I can read about the parameter which controls MARKERS in lines?

  • [deleted] replied

    Unfortunately, you cannot read anything about core parameters of a specific chart engine in our documentation, since they are not parameters of wpDataTables, but the chart engine that you're using. Like you said - you're trying to modify default behavior of a chart, and that can't be done with built-in functionalities the free chart engine library provides. You need to modify the default behavior of a spline chart, and remove the markers. That can only be achieved by modifying the chart with a callback. Since it is not included in built-in customization options for the chart, it's not in the chart wizard, and because of this it requires a custom solution which is not included in the provided support for the plugin.

  • Dave replied

    Alexandr previously helped me with the callbacks not sure why you cannot do the same:

    https://tmsplugins.ticksy.com/ticket/2640252

    I tried adapting his previous callback suggestion to remove the markers and it understandably is not working - maybe you can correct this? there must be just a small syntax error:



    <script type="text/javascript">
    jQuery(window).on('load',function(){
        if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
            wpDataChartsCallbacks[16] = function(obj){
                    obj.options.plotOptions.series.marker= {enabled= false};
                }
    });
    </script>

    or it should be


    <script type="text/javascript">
    jQuery(window).on('load',function(){
        if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
            wpDataChartsCallbacks[16] = function(obj){
                    obj.options.plotOptions.series.marker.enabled= false};
                }
    });
    </script>

  • [deleted] replied

    Hi Dave

    What Aleksandar provided on that ticket is a part of a saved response. Similar to the data we have on our FAQ section - if there's a way to do something with callbacks, and we already have a saved reply, we will gladly share it with you. 

    If you asked about skipping NULL values on a chart, I would've shared the same response with you. I can take a look at the callback on your website, if you're willing to provide me a temporary administrator role, but I cannot promise anything. 

    Please tell me which table, which chart and which page I'm supposed to look at, and I'll see if there's any small modification I can make to your callback to get it to work. If it takes more than 15 - 20 minutes of my time, though, I will need to abandon the callback.

  • Dave replied

    I added this line and it worked! no markers found!!!!  you can use it for future

    obj.options.plotOptions.series.marker = { enabled: false };

  • [deleted] replied

    Perfectsmile.png 

    I'm glad to hear that. We will save this for future reference, I am sure many of our clients will find this useful.

    Do let us know if there is anything else we can assist with.

    Have a wonderful day!