Questions tagged [d3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
1k views

How to call a function on renderedCallback() that have dependency on @api in LWC

I am working on an LWC component that renders a d3 chart. I get the chart data from the parent component. @api assetClassValue renderedCallback() { this.initializeD3(this.assetClassValue); } ...
Noor A Shuvo's user avatar
1 vote
0 answers
269 views

Issue importing dependent libraries in LWC

I'm trying to create an orgChart in LWC to represent how my objects are set up. I found the following library to do it : https://github.com/bumbeishvili/org-chart When looking at the examples, he ...
Sacha Dieryck's user avatar
2 votes
0 answers
539 views

Why wont my object pass to the d3.hierarchy method?

I am trying to build a LWC that uses d3 js to build a tree of accounts with related children nodes. I modeled my code after something similiar I found online so it has the lightningElement class at ...
Benton's user avatar
  • 51
1 vote
1 answer
616 views

D3 javscript: How to add a div in aura component?

I am trying to create a map hierarchy visual aura component using D3 library and d3 tree and d3.hierachy methods. The original code had circles in place for the nodes, but I want to append a div so ...
Benton's user avatar
  • 51
0 votes
0 answers
168 views

Create shapes based on Multipicklist values using D3.js & Apex Imperatively in a LWC

I am trying to create shapes depending on the values selected on my multipicklist fields. On my record Patient Journey, I am able to select steps and sub-steps. Let's say I select 3 steps on the ...
Elliott Alderson's user avatar
0 votes
1 answer
615 views

Use record's data in d3.js geochart in lwc

I'm trying to build a lwc component that will print a map chart with values from salesforce. In each region I have several accounts and I want to sum all my data for the connected commercial. So I ...
Jack's user avatar
  • 93
0 votes
1 answer
1k views

Convert list of object to CSV string

I'm using the d3 library trying to do a geo chart with LWC. To do so I need a csv file with my values in it like the example bellow var promises = []; promises.push(d3.json('d3js/map-population/...
Jack's user avatar
  • 93
2 votes
1 answer
731 views

D3js svg does not render on first page load

I have a custom visualisation inside a lightning component which uses d3js. My svg is well rendered whenever I hard refresh the record page containing the custom component, but does not display when I ...
Jurgen Palsma's user avatar
1 vote
1 answer
644 views

D3 Dynamic Height with Expandable SVG in SF Lightning

I have a LWC that has an svg embedded inside of it. The SVG is a D3js tree grid that I can select parent nodes and the children will appear below it. The issue that I am having is that when I embed ...
Stephen's user avatar
  • 478
1 vote
1 answer
351 views

Set Salesforce LWC Variable from D3 data

I am able to visualize my D3 chart within a Salesforce LWC component, but now what I want to do is when I click on a selected node within the D3 code, I want to pass the selected node data (d.data) to ...
Stephen's user avatar
  • 478
1 vote
0 answers
872 views

Aligning D3 Area Chart X-Axis Ticks correctly [closed]

I am building an area chart using the D3 Library, and I used their area chart example to help me construct it. However, I am not using dates as along the x-axis, instead I am using Strings, so I tried ...
BlondeSwan's user avatar
  • 1,098
5 votes
0 answers
534 views

d3.js in Lightning Component - TypeError: cannot use the given object as a weak map key throws in Firefox

this error appears in Firefox (56.0) when trying to run (d3.js v4): svg = svg.call(d3.zoom().on("zoom", zoomed)).append("g"); or .call(d3.drag()... in Lightning component. error: TypeError: ...
Karel L's user avatar
  • 344
2 votes
0 answers
336 views

The d3 js initialization failed in firefox with locker service activated (Summer 17)

The issue is that I am trying to draw a tree using the d3 js library and it works perfectly in chrome and edge, but when I tried to use firefox for this purpose the tree didn't look correctly. The ...
Nadezhda Podobed's user avatar
1 vote
1 answer
834 views

D3 Js with Visual Force [closed]

I am Creating a Customize Chart using D3.Js I am able see the graph with Static data as a given in example But I am not aware of how to bind data dynamically Here is My Code <apex:page ...
Sri's user avatar
  • 21
1 vote
0 answers
229 views

Issue with d3.4.4.0 and lightning locker service

I used the below code to implement collapsible tree chart using d3.js. The same code works fine with lockerservice off. With lockerservice on the tree chart is not working. What I have found is the ...
Sivakumar's user avatar
  • 131
8 votes
1 answer
529 views

Issues with running LockerService, d3, and Lightning components

Our d3 & Lightning Components work correctly when LockerService is turned off, but do not work when Locker Service is turned on. We're running d3 4.4.0 as specified by the list of Locker Service ...
SRenberg's user avatar
  • 153
1 vote
0 answers
28 views

Salesfoce client side updated content (d3 chart) not showing on subsequent loads [duplicate]

I am trying to create a d3 Chart from third party JavaScript file, calling the JavaScript function from Salesforce lightning component on afterScriptsLoaded event. <ltng:require scripts='/resource/...
user43889's user avatar
4 votes
1 answer
264 views

LockerService with Lightning Components & d3 transformation issue

I'm experiencing issues with d3 v4.4.0 and v4.7.3 when I'm trying to redraw some chart. There is a problem with g tag decomposition. When I try to redraw some element: rect.transition() ....
Mystery's user avatar
  • 155
1 vote
0 answers
619 views

Issue with disappearing charts in Salesforce Lightning

I am using D3, a 3rd party JS library, to create a bar chart and a progression chart on a lightning component. I am using the following line to load the library. <ltng:require scripts='/resource/...
user3562811's user avatar
1 vote
0 answers
381 views

How to draw bullet chart in Lightning component?

Is there any js library to draw bullet chart in Lightning component ? I have tried with d3.js and bullet.js in two different approaches but failed. I created lightning component and in helper method, ...
Inder Waraich's user avatar
2 votes
2 answers
778 views

LockerService and D3 version 4 causing random Promise error in ltng:require [closed]

I'm trying to use D3 Graph library in Lightning Component with LockerService activated. The component works fine, but randomly it fails to load with error messages like: Error Message in Chrome: ...
VarunC's user avatar
  • 5,950
4 votes
2 answers
2k views

Using dc.js (d3.js and crossfilter) in visualforce

Today I was able to make angular.js run in visualforce. Now, I am trying to use the dc.js in visualforce to generate graphs. I create a page and this is how my code looks like: <apex:page ...
Koba's user avatar
  • 291
0 votes
1 answer
7k views

Uncaught ReferenceError: d3 is not defined

While trying to execute, i'm getting an error saying d3 is not defined . Referring to the link : http://bl.ocks.org/mbostock/3885705 to create bar chart. Appreciate the help. <apex:page sidebar="...
JJoseph's user avatar
  • 491