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 Query
- How do you create a survey that will immediately display the results as a pie chart on a website?
- How to display the pie chart legend with proper style so that the chart is visible
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- how to display 2 same highcharts without duplicate the code
- How to display a clickable pie chart in the cell of a html table?
- how do you create muliple charts with the same options but with different data
- Highchart - How do I create the attached image gauge within a semicircle pie chart
- How can you change the length of the dial radius of a gauge that is already rendered?
- Rshiny Highcharter how can I create a piechart that drills down into another pie chart?
- how do you create custom buttons with highcharts that each data buttons calls anather php script for its data
- How do you reduce the space between pie chart and legend? (highcharts.js)
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Highcharts - How can I get the name to display in the pie wedges?
- 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?
- how do you display only the latest poll data in highcharts
- Create Highcharts data label formatter that filters the data to display
- How do you change the colour of each category within a highcharts column chart?
- How to use the tooltip formatter and still display chart color (like it does by default)?
- How to hide labels in the highcharts in the pie
- How can I remove the white border from HighCharts pie chart?
- How do you increase the performance of highcharts chart creation and rendering
- Highcharts - How to display legend symbol inside the tooltip
- HighCharts - How to create dynamic chart that exports EVERYTHING
- How to change the font properties in a pie highchart?
- How do you add text to the bottom center of legend and bottom center of chart under legend?
- How do you increase the height of the x-axis labels area on a highchart.js chart?
- Highcharts: How do I set dynamic data to the drilldown pie chart?
- Highcharts, How can I change the datalable distance in a pie chart based on the value
- Highcharts: How to add an arrow head at the tip of a connector in a pie chart?
More Query from same tag
- What is the maximum number of y-axis that you can add to a highcharts chart?
- Highcharts change symbol and hover text of individual points Line Chart
- Highcharts Local CSV Issues
- highcharts pie dynamic label inside and outside for each slice
- Highcharts graph X-axis label for different date ranges
- My highchart not showing the correct time on the x-axis
- Highchart Pie chat not display Codeigniter
- high charts parse json data
- R Highchart // grouped categories in x axis
- How to render Highcharts graph into user-selected DIV
- Highcharts - time off by 1 hour
- Negative value for categories axis in highcharts
- FillPattern after drillDown to countries on Highchart-react
- Highcharts - hover event handling for tooltip throws exception
- Drilldown broken in Highcharts?
- Highcharts scatter chart legend toggle running slow
- How do I display multiple charts automatically with PHP and MYSQL?
- How to use highcharts with princeXML?
- Library duplication issue using Highcharts in Jaspersoft Studio
- Highcharts renderer in websharper
- How To disable "shadow-gradient" of format?
- Highcharts Tooltip formatting for shared Tooltips
- Data format and X/Y configuration for dynamic csv display
- Highcharts skip columns when plotting
- How to get 2 data-points with one name in series Line Graph Highcharts Reactjs
- highcharts line chart with same x value, how to handle click events
- Hide legend for zero values
- Load json-data into Highchart
- stacked bar chart shows hanging zeros when all values are 0 highcharts
- Highcharts - How to make a scatter plot with multiple series from HTML table