primeNG uses chart.js as a chart, and a separate chart.js can use a mixed chart. I would like to ask primeNG how to use a mixed chart.
template
< p-chart type= "scatter" [data] = "data" [options] = "options" > < / p-chart >
I write as chart.js
but it shows only the points of the scattered graph, not the linear graph. Here is the code:
this.data = {
datasets: [
{
label: "",
data: [{x:1,y:5},{x:3,y:7},{x:8,y:10}],
fill: false,
borderColor: "-sharpfff"
},
{
label: "",
data: [{x:5,y:8},{x:3,y:7},{x:8,y:10}],
fill: false,
borderColor: "-sharpfff",
type: "line"
}
]
}
this.options = {
responsive: false,
title: {
display: true,
text: "",
fontSize: 12
},
scales: {
yAxes: [
{
scaleLabel: {
display: true,
labelString: "KKWH"
},
gridLines: {
display: false
}
}
],
xAxes: [
{
type: "linear",
position: "bottom"
}
]
}
};