score:2
I suppose your question is high-level and in two parts. This is not a coding answer because your question is too high-level. We don't even know what type of back end you have access too.
Gather your data This part has nothing to do with d3.js and is dependent upon your back end. You need to show the user an HTML form with the question and possible answers to your survey. The form will post to your back end (asynchronously, perhaps) and persist the answer in some sort of a data store (usually a database).
Display your data
You should have an endpoint in your web application for extracting the aggregate results from your survey. It should return the data in a form that can be read by JavaScript (JSON, perhaps?) so that you can reference it from your d3.js call to get the data. You can then use d3.js to display the data as a pie chart. If you have trouble writing your own pie chart, consider a boxed approach. You can also find examples of using the pie
layout in d3.js.
If you can give us any more information, I'd be happy to expand upon this answer further.
Source: stackoverflow.com
Related Articles
- How do you create a survey that will immediately display the results as a pie chart on a website?
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Create Highcharts data label formatter that filters the data to display
- HighCharts - How to create dynamic chart that exports EVERYTHING
- how to display 2 same highcharts without duplicate the code
- How to display rounded corners in a highcharts column on a Y Axis that starts above 0
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- Highcharts will not display data
- Highcharts display label for pie chart using html table as data source
- Strange character in the Highstock source code
- What's the code in Highcharts such that the bars (columns) in the same group use the same color?
- How to display only last point on highcharts and that point should travel with chart line?
- tool that shows javascript errors in code
- How Can we display a legend in high chart that contains apostrophe
- Can not get highchart to display on page - only example will display
- Rshiny Highcharter how can I create a piechart that drills down into another pie chart?
- Converted PHP code that built an array to JS and now highcharts doesn't work - what did I do wrong?
- How to create a drilleable bar graph in jsp page using open source charts API
- how do you create custom buttons with highcharts that each data buttons calls anather php script for its data
- Highcharts.js question: is it possible to add blank space from the left and right side of chart that will be visible only during panning?
- Decimals on yAxis are not being displayed, even if that same code works on highcharts jsfiddle
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How do you create a Hight Charts chart that updates every second with real data?
- highstocks, how can I bring values that I will only use on the 'click' option?
- Angular HighCharts Heatmap will not display with error 15
- How to display the pie chart legend with proper style so that the chart is visible
- Highcharts: How can I create a table of strings that can also export as an image?
- How can I add links in a Highcharts tooltip that will open on mobile's browser?
- Highcharts limit the amount of items that will be displayed in categories on the yAxis
- When I hover the curve on any point,the tooltip will display the first point
- how to change bar hover color of highchart dynamically?
- How can i align the highchart legend pagination to right or left side of the legends?
- Highcharts - Fix the Width of the xAxis Categories (and Wrap them)
- High Charts - Organizational Chart
- How to reduce the area around a highcart?
- Highcharts - Plotbands on a column chart
- Highcharts how to make legends as data labels on scatter plot
- Highcharts add a legend for marker colors
- Highcharts (scatter) tooltip notworking
- Highcharts How To Select Column From Stack
- Rendering the charts as columnrange type
- Save and load highcharter graph in R
- How to show categorized Highcharts Chart using csv file
- Highcharts Highmaps prevent initial zoom effect
- Auto-refresh Json data in Highcharts
- On DrillUp Set Series Name Failing
- DotNet HighCharts Png Image
- Animate half pie diagram
- Plot Histograms in Highcharts
- How can I add a text link just below the legend box in highcharts