Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
925
igDataChart - Custom markerTemplate legend issues
posted

Hi,

 

If I use a custom markerTemplate to modify the default size/appearance of markers, taking a scatter chart as an example, the legend for a multi series chart will not show a marker next to the legend entries? See here for a screenshot - http://sdrv.ms/VFmCQW

Can you tell me if this is a bug and if not then how I get the legend to show the correct marker. My JS code for generating the chart series is below:

chartSeries.push({
                name: 'Series0',
                title: 'Series0',
                dataSource: FormatScatterData(data, ''),
                type: 'scatter',
                markerType: 'circle',
                markerTemplate: new CircleMarker(markerSize, markerThickness),
                brush: getBrush(seriesCount),
                markerBush: getBrush(seriesCount),
                xAxis: 'xAxis0',
                yAxis: 'yAxis0',
                xMemberPath: 'DataPoint2',
                yMemberPath: 'DataPoint1',
                showTooltip: false,
                thickness: 0
            });
 
Many thanks,
Chris
Parents
No Data
Reply
  • 29417
    Offline posted

    Hello newc1 ,

     

    Thank you for posting in our forum.

     

    Are you adding that series runtime or on the initial load?

    If you’re adding an additional series runtime you would need to add it to the series using the series option. For example:

    $("#chart").igDataChart("option", "series", [{

                    name: "series2",

                    dataSource: generateRandomData(),

                    type: "scatter",

                    xAxis: "xAxis",

                    yAxis: "yAxis",

                    xMemberPath: "Index",

                    yMemberPath: "Value1",

                    markerTemplate: {

                                render: function (renderInfo) {

    … 

      }

                            }

     

     

                }]);

     

    This would add a new series to the current chart with the specified marker template.

    I’ve attached a sample for your reference. Let me know if I’m missing anything from your scenario.

     

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    customMarkerTemp.zip
Children