score:22
Accepted answer
to show only the dots, you need to set the showline
property to false
for your dataset.
here is an example :
var chart = new chart(ctx, {
type: 'line',
data: {
labels: ['jan', 'feb', 'mar', 'apr', 'may'],
datasets: [{
label: '# of votes',
data: [3, 4, 1, 5, 6],
pointbackgroundcolor: 'black',
pointradius: 5,
fill: false,
showline: false //<- set this
}]
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.6.0/chart.min.js"></script>
<canvas id="ctx"></canvas>
Source: stackoverflow.com
Related Query
- ChartJS : How to leave just points without lines
- How to combine lines with different starting points in chartjs
- ChartJs How to display horizontal and vertical lines through the datasets points with their values on axes?
- how to always show label in chartjs without mouseover?
- How to make points in chartjs draggable?
- How to add background color between two lines in yAxis Chartjs
- How to add ChartJS code in Html2Pdf to view image
- How to remove some points in chartjs
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- ChartJS / Chartjs-plugin-annotation How to draw multiple vertical lines using an array?
- How to add background color between two specific lines in Chartjs 3.1
- How to show both overlapping lines in in chartjs
- How to hide some points inside my line graphic in React ChartJS 2?
- How to set vertical lines for new day on x-axis in ChartJS v3.x
- How can I make small grid lines above ChartJS labels?
- How to reduce the number of points shown on line chartjs chart with a large dataset?
- how can i remove the grid lines in chartJs
- ChartJS - How to change color of some data points in graph
- How to properly feed data to ChartJS with different number of x(labels) and y(data) points
- ChartJS Pie Chart How default just show 2 legend datas
- How to move the x-axis values and line points to the middle of two x-axis lines using chartjs?
- How to fix the distance between horizontal points (x-axis) in chartJS
- ChartJS How to set color to just one bar
- How can I change the color of certain lines in chartjs / vue-chartjs?
- How to make dashed thick lines with dots in ChartJS ? Is it possible?
- How to run Chart.js samples using source code
- Hide points in ChartJS LineGraph
- ChartJS Line Charts - remove color underneath lines
- Skip decimal points on y-axis in chartJS
- How to set ChartJS Y axis title?
More Query from same tag
- How I can increase the number of colors for bar labels in ChartJS?
- React input to filter to chart. How convert a hardcoded number into a variable?
- JS count numbers between
- Javascript Chart.js scale fix
- bind angularjs currency to scaleLabel in chart.js
- Chart.js: summing number of items in active/shown datasets on yAxes of pie chart
- ChartJS: datalabels: show percentage value in Pie piece
- Chart.js minimal width of Chart with scrollable overflow
- How to get Data from API to display chart using chartjs in Vuejs
- How to provide different labels in chart.js for toolbox and axis
- show xAxes on click
- How to allow copying of text within Chart.js tooltips?
- Chartjs - How to get last 7 days on x-axis labels?
- Export chart and table both to pdf
- Chart.js chart in vue.js component does not update
- ChartJS with AngularJS
- Ionic2: Use chartjs inside ion-segment
- Chart.js 2.9.4 - howto set a margin for axes min\max and time axis label separation
- White Space in stacked bar using chart.js
- How to show label at right side of Y axis same as left side of Y Axis ChartJS
- Draw a horizontal and vertical line on mouse hover in chart js
- Prevent chart.js "jumping"
- ChartJS charts not generating within tabs
- react-chartjs-2 time scale dates not formatting
- Is there anyway add 2 or more chart with foreach loop
- How do we put labels on pie chart arcs - chart.js/vue-chart.js
- Calling MouseLeave chartJs Angular
- How to do automatic pan with Chart.js
- Chartjs Custom Legend for Doughnut Chart Having Labelled Lines Sticking Out of Each Section
- I want to see all the labels on the X-axis of my graph in Chart.js, but only a few of the labels are coming.