Custom symbols in dc

29 views
Skip to first unread message

Robert Anderson

unread,
Feb 2, 2017, 2:04:06 PM2/2/17
to dc-js user group

I have created custom symbols accessed from d3.js code...but I am wondering if anyone has had success accessing custom symbols from .symbol() (specifically a scatterPlot)? 

My initial cursory look thru the code is that only the d3.svg.symbol() is supported.

Any feedback is greatly appreciated.

Gordon Woodhull

unread,
Feb 2, 2017, 4:45:10 PM2/2/17
to dc-js-us...@googlegroups.com
Hi Robert,

Indeed it seems like an oversight in the interface. I agree it should be allowed.

If you're willing to edit the source, I think you could add it to the scatterPlot like this:

    _chart.customSymbol = function(customSymbol) {
        if (!arguments.length) {
            return _symbol;
        }
        _symbol = customSymbol;
        return _chart;
    };

I've added an issue to track this request:

Cheers,
Gordon 
--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/c8086ed3-144f-4556-a37f-22da043d06dd%40googlegroups.com.

Robert Anderson

unread,
Feb 3, 2017, 9:55:07 AM2/3/17
to dc-js user group
Thanks Gordon...

Robert Anderson

unread,
Feb 4, 2017, 6:08:21 PM2/4/17
to dc-js user group
Another question re: custom symbols: is there a way in dc.js to rotate a standard symbol? For example, rotate the cross 45 degrees to that it changes from a  '+'  to an 'X'?  This doesn't negate my need for other custom symbols, but simply rotate an existing symbol would meet one of my requirements,
Reply all
Reply to author
Forward
0 new messages