cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
To change a series within a line chart to display only the markers (data points), you can use the following code within a line chart's widget script. Just manipulate the series variable to correspond with your desired series.
widget.on('processresult', function(widget, args) {

    var series = args.result.series[1];
    
    series.lineWidth = 0.001;
    series.states = {
        hover: {
            enabled: false
        }
    };
    
    $.each(series.data, function(idx, el) {
        el.marker.enabled = true;
    });
});

For two or more categories, there is a data modeling workaround.

Before - using 2 Categories fields:

After - using a single Categories field of concatenated fields:

Create a custom column that is a concatenation of the 2 fields that you want to use as categories:

Custom column: [Condition] + '-'+[Gender] 
Build schema changes.
Replace the 2 category fields in the widget with this new single multi categories concatenated field.
 
Put the following script in the widget script:
widget.on('render', function(sender, se){

var s = sender.queryResult.series[2];

// Change series to a line, enable the marker and hide the line
s.type = "line";
s.lineWidth = 0.01;
s.marker = {
enabled: true,
radius: 6
};

// When hovered state to disabled and lineWidth to 0
sender.queryResult.plotOptions.series.states.hover.lineWidth = 0;
sender.queryResult.plotOptions.series.states.hover.lineWidthPlus = 0;
// Change the hover fillColor
sender.queryResult.plotOptions.series.marker.states.hover.fillColor = 'white';

})
Rate this article:
Version history
Last update:
‎03-02-2023 09:08 AM
Updated by:
Contributors