score:14
One solution may be: set values of dataset(1) to null when it isn't visible. This line does not create a bezier Curve, it's the inconvenience.
Example:
var lineChartData = {
labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
datasets: [{
label: "My First dataset",
data: [, , , , 2, 3, 4],
borderColor: '#66f',
borderDash: [20, 30],
pointBackgroundColor: "transparent"
},{
label: "My First dataset",
data: [1, 8, 3, 4, 2, , ],
borderColor: '#66f',
pointBackgroundColor: "transparent"
}]
};
Source: stackoverflow.com
Related Query
- Chart.js: Line chart with partial dashed line
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- line chart with {x, y} point data displays only 2 values
- Display line chart with connected dots using chartJS
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- Chart.js - line chart with two yAxis: "TypeError: yScale is undefined"
- How to display Line Chart dataset point labels with Chart.js?
- Chart.js Mixed Bar and Line chart with different scales
- chart.js Line chart with different background colors for each section
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Obtain max value of y axis of line chart rendered with Chart.js
- ChartJS - Line Chart with different size datasets
- Line chart with large number of labels on X axis
- ChartJS - Line chart issue with only 1 point
- ChartJs line chart - display permanent icon above some data points with text on hover
- Is it possible to revert x-axe values in line chart with chart.js
- Drawing line chart in chart.js with json response
- Chart.js line chart with area range
- Extending Line Chart with custom line
- Can we draw a Line Chart with both solid and dotted line in it?
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- Line Chart x-Axis datapoints with Strings
- Gradient line chart with ChartJS
- Chart.js: compare two periods like Google Analytics with a line chart
- How to add area with break on line chart with fill color
- Angular-chart / line chart with multiple horizontal lines (margins)
- How do I use my chart.js line chart with handlebars?
- Combo Bar Line Chart with Chart.js
More Query from same tag
- Chart.js 3.3.0 - Draw text on top of chart
- Chart.js doesn't show anything
- I'm unsure of how to get vue js and charts js to work together. correctly
- chartjs display data in one bar line with 3 different data sets in 3 different colors
- impossible to remove scale from radar chart (chart.js)
- Graphing the timestamp and data from mysql
- Trying to access key in JSON array
- Chartjs 3.x Migration Guide notes on animation not working
- Convert a JSON file to an array in javascript to visualize the data in ChartsJS
- Chartjs 1 to n relationship
- Create multiple pie chart simultaneously using chart.js
- Bar Chart Not Stacking When Using ChartJs
- Chart js :Adding onclick event on slice of doughnut chart is not working in react-chartjs-2
- Chart.js 2.x: labels displaying over eachother
- How to use legendCallback or similar when using Chart.js with TypeScript
- Unable to change y-axis value dynamically based on data for Stacked bar chart in reactjs
- Change chart values from API
- How to display data labels outside in pie chart with lines in ionic
- How to adjust the Js Chart's label?
- Add dynamic dataset to chart.js
- Chart.js - Uncaught TypeError: Object.defineProperty called on non-object for multiple charts
- Chart.js fix minimum axes?
- How to use images as key for chart.js legend
- Create IF to change chart.js bar color
- Chart.js not updating or receiving data from Flask python
- Chart.js custom tooltip events
- Chart.js - How to show loading animation before plotting chart
- How to make animated bar graph with canvas?
- Unable to Construct Stacked Vue-ChartJS Line Plot
- show more dataset than labels in chart.js