score:0
Accepted answer
has i was saying, this might be a good solution for your problem. i've made a simple example demonstrating a multiline chart with strings at xaxis:
https://codepen.io/anon/pen/nmvglo
here you can see how did i build part of the chart "data"
var data = {
labels:["2015", "2016", "test"],
datasets:[
{
label: "data1",
fill: false,
linetension: 0.1,
bordercolor: "red",
pointhoverbackgroundcolor: "yellow",
data: [
{x:"2015",y:5},
{x:"test",y:10}
]
},
{
label: "data2",
fill: false,
linetension: 0.1,
bordercolor: "blue",
bordercapstyle: 'square',
pointhoverbackgroundcolor: "yellow",
data: [
{x:"2015",y:5},
{x:"2016",y:10}
],
spangaps: true,
}
]
};
Source: stackoverflow.com
Related Query
- Line Chart x-Axis datapoints with Strings
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- 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
- Line chart with large number of labels on X axis
- Chart with Time axis only displaying first grid line and tick label (unitStepSize)
- How to use chart.js to plot line chart with x axis as time stamp in seconds
- Rotating a chart.js pie chart with two datapoints to align both sectors on horizontal axis
- hereChartJS Line Chart with Time Axis
- Multiple axis line chart with Chart.js and JSON data from Google Sheet
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- line chart with {x, y} point data displays only 2 values
- Display line chart with connected dots using chartJS
- Chart.js - line chart with two yAxis: "TypeError: yScale is undefined"
- How to display Line Chart dataset point labels with Chart.js?
- show label in tooltip but not in x axis for chartjs line chart
- 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?
- Chart.js Dynamically Updating Chart with X Axis Time
- Chart.js: Line chart with partial dashed line
- Changing x axis labels in Chart.js line chart
- ChartJS - Line Chart with different size datasets
- chart.js switch x/y axis on line chart
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- ChartJS - Line chart issue with only 1 point
- ChartJs line chart - display permanent icon above some data points with text on hover
- Map event position to y axis value in chartjs line chart
- Is it possible to revert x-axe values in line chart with chart.js
More Query from same tag
- Angular 5 chart.js onclick returning empty array
- how to set a custom tick format in chartjs options from laravel controller?
- Chart js legend are being cut off if the bar height is equal to port height - chart js
- Chart.js line chart: gap between December and January
- All the bar in bar chart stays at left with very little width
- Convert SQLite PHP array into Javascript array?
- how to show data label on barchart using chart.js in Angular10 project?
- Page break in Angular with Chartjs and tables
- chart.js time series multi axis case
- ChartJS Stacked Bar Chart: Showing value in opposite directions
- Unregister plugin in Chart.js
- protoype js 1.0.6 is conflicting with chart js
- Angular PrimeNG p-chart chartsjs is not showing
- Create multiple dynamic stacked chart using chart.js in Angular 10?
- Updating data in chart.js
- Chart.js not installing with NPM
- ChartJS - TypeError: Cannot read property '_model' of null - Angular
- charts.js update global variables
- Change Chartjs label color on click without losing hover
- Multiple axis line chart with Chart.js and JSON data from Google Sheet
- How to load an array of external data in QuickChart?
- "Inline" labels in ChartJS
- Incorrect time chart Chart.js
- Changing data when click button in chart.js/vue.js
- How to decrease the barthickness in ng2-charts?
- HTML in Chart.js labels
- chart.js npm module not working
- Trying to load a chart with chart.js, through ajax and php
- ChartJS Line chart cut off at the top and bottom
- Smallest values are invisible in ng2-charts bar charts