score:8
Accepted answer
Demo & Code :
https://stackblitz.com/edit/js-jp4xm4?file=index.js
Explanation:
- Used a scatter chart to plot points
- Added (wrote) a chartjs plugin that converts points from polar to cartesian on
beforeUpdate
so you don't have to worry about converting before every update - Made x & y grid (not axes through origin) hide by adding
gridLines
: { color: 'transparent' }
andticks
: { display: false }
- Made
min
andmax
(options inticks
) of both axes equal so that the orgin is at the center - Added a
radialLinear
scale for the polar grid
(Update 1)
- Added a tooltip label callback to show tooltip as (r,θ) instead of default (x,y)
(Update 2)
- Added (wrote) a
beforeDraw
plugin to fill thectx
with light blue color as the OP wanted
PS: (Pointing out just to be a little competitive) I have used chartjs (unlike other answers) because the OP wants a chartjs solution as it's clearly written in the question: "using chart.js". There might be solutions better than chartjs but that's irrelevant.
score:6
You can use D3 js Charts is usefull for radar chart check the example link bellow :
//////////////////////////////////////////////////////////////
//////////////////////// Set-Up //////////////////////////////
//////////////////////////////////////////////////////////////
var margin = {top: 100, right: 100, bottom: 100, left: 100},
width = Math.min(700, window.innerWidth - 10) - margin.left - margin.right,
height = Math.min(width, window.innerHeight - margin.top - margin.bottom - 20);
//////////////////////////////////////////////////////////////
////////////////////////// Data //////////////////////////////
//////////////////////////////////////////////////////////////
var data = [
[//Yourchart values
{axis:"",value:0.052},
{axis:"",value:0.052},
{axis:"",value:0.012},
{axis:"",value:0.012},
{axis:"",value:0.022},
{axis:"",value:0.052},
{axis:"",value:0.052},
{axis:"",value:0.021}
]
];
//////////////////////////////////////////////////////////////
//////////////////// Draw the Chart //////////////////////////
//////////////////////////////////////////////////////////////
var color = d3.scale.ordinal()
.range(["#6cbb69","#CC333F","#00A0B0"]);
var radarChartOptions = {
w: 500,
h: 300,
maxValue: 0.15,
levels: 5,
roundStrokes: true,
color: color
};
//Call function to draw the Radar chart
RadarChart(".radarChart", data, radarChartOptions);
Source: stackoverflow.com
Related Query
- What's the most effective way to implement a radar plot with 50 points at arbitrary locations using chart.js
- what is the correct way to destructure a nested json object with fetch?
- Chart.js -> line chart -> multiple points with the same X
- How to reduce the number of points shown on line chartjs chart with a large dataset?
- Problem with script src for Chart.js. The CDN for Chart.js funtions fine, so my code is ok. Somehow I'm not linking the file correctly
- chartjs plot datetime value with time offset on the grid
- Bar chart (chart.js) with only 2 points does not show one of the bars
- How to plot a line chart which has both the start and points outside the canvas area using Chart.js
- Is there a more optimized way to implement the change function of chart js upon changing the dropdowns?
- Is there any way to show a tooltip for points which are not visible on the chart in Chart.js?
- react-rchartjs-2 Radar - dataset with less points than lables
- Position of the x-axis labels is not in sync with the line chart data points
- ChartJs How to display horizontal and vertical lines through the datasets points with their values on axes?
- Is it possible to display values where the display ends instead of on top of the points with chartjs?
- Chart.js - Plot line graph with X , Y coordinates
- chartjs: How to plot multi-line chart with irregular intervals
- How to change the color of Chart.js points depending on the label
- ChartJS: get points information on hovering the points
- Chart JS show multiple data points for the same label
- implement chartjs zoom with buttons
- Testing Chart.js with Jest/Enzyme - Failed to create chart: can't acquire context from the given item
- Why can I not see a data value when hovering over a point on the radar chart?
- ChartJs line chart - display permanent icon above some data points with text on hover
- chart.js v2: Align time scale labels with the center of the bars
- How to change cursor style to pointer on hovering over points of the chart?
- Chartjs, plot data based with unequal time intervals
- Chart.js - Plot line graph with X , Y coordinates and connected by line
- How to show only the data points that have a change in Chartjs?
- Maintain Y axis scale in graph with scroll in the X axis when the dataset grows bigger. Aspect-ratio problem
- Mixed chart scatter plot with chart.js
More Query from same tag
- How to change format of DateTime reading into chart.js chart?
- angular-charts 1.0.0 not working like inner directive when element
- How remove duplicates xAxis labels and show all values on chart
- Detecting hover events over parts of a chart using Chart.js
- charts.js tooltips on different data ranges
- Angular and ChartJS colors
- Chart.js updating-animations of radar-charts
- Chart.js How to synchronize pan and zoom in multiple chats
- angular directive is not working with chartjs
- ChartJS on NodeJS: error Chart is not defined
- ChartJS multiple tooltip callbacks not working
- Use fetch to get JSON Data for Chart JS
- ng2-chart tooltip position change option?
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- Dynamically update values of a chartjs chart
- Piechart doesn't show up in Canvas
- Hiding the ticks on the x-axes clips the chart (Chart.JS)
- Chart.js use font awesome in labels
- Laravel passing orders to Chart.js
- Trying to display different types of charts using select/option tag
- Chart not rendering on ChartJS
- How to align bars in bar chart - Chart.js
- React Chartjs 2 display axes above datasets backgroundColor
- "<%=value%>" in javascript not ASP.net
- How can i get my chartjs to show up graphically?
- Show/Hide data from Barchart with Chart.js
- How to generate bubble chart (Chart.js) using data from database FILTERED by user in Django?
- Chart.js - graph responsivity / sizing
- Points cut at half at the edges of top and bottom, at chartjs
- Show label for every data point in line chart