--- a PPN by Garber Painting Akron. With Image Size Reduction included!URL: http://github.com/plotly/plotly.js/pull/7653.diff
I / 2;
+ var x = radius * Math.cos(ang);
+ var y = radius * Math.sin(ang);
+ path += (i === 0 ? '' : 'L') + x.toFixed(2) + ',' + y.toFixed(2);
+ }
+ path += 'Z';
+ return path;
+ }
+
+ // Create the plot
+ var trace = {
+ x: [1, 2, 3, 4, 5],
+ y: [2, 3, 4, 3, 2],
+ mode: 'markers+lines',
+ name: 'Custom Markers',
+ marker: {
+ symbol: [heartMarker, star5Marker, 'circle', star5Marker, heartMarker],
+ size: 20,
+ color: ['#e74c3c', '#f39c12', '#3498db', '#ff9800', '#c0392b'],
+ line: {
+ color: '#34495e',
+ width: 2
+ }
+ },
+ line: {
+ color: '#95a5a6',
+ width: 2,
+ dash: 'dot'
+ }
+ };
+
+ var layout = {
+ title: 'Custom Marker Functions Demo',
+ xaxis: {
+ title: 'X Axis',
+ gridcolor: '#ecf0f1'
+ },
+ yaxis: {
+ title: 'Y Axis',
+ gridcolor: '#ecf0f1'
+ },
+ plot_bgcolor: '#fafafa',
+ showlegend: true
+ };
+
+ Plotly.newPlot('plot1', [trace], layout);
+ console.log('Plot created successfully!');
+
+