var dataset = [10, 20, 30, 40, 50]; var color = d3.scaleOrdinal(d3.schemeCategory10); var pie = d3.pie() .value(function(d) { return d; }); var data = pie(dataset); var arc = d3.arc() .innerRadius(0) .outerRadius(100); var svg = d3.select("#myChart") .append("svg") .attr("width", 200) .attr("height", 200); var arcs = svg.selectAll("g.arc") .data(data) .enter() .append("g") .attr("class", "arc") .attr("transform", "translate(100,100)"); arcs.append("path") .attr("d", arc) .attr("fill", function(d, i) { return color(i); });This code example creates a simple pie chart with the data values of [10, 20, 30, 40, 50]. The `d3.pie()` function creates an array of objects with the angles for each data value. Then, the `d3.arc()` function creates the arcs for each slice of the pie chart. Finally, the `fill` attribute is set to the colors of each slice using the `d3.scaleOrdinal()` function. The package library used in this example is d3.js.