sgratzl / chartjs-chart-pcp

Chart.js Parallel Coordinates Plot
https://www.sgratzl.com/chartjs-chart-pcp/
MIT License
19 stars 2 forks source link

Is it possible to have multiple datasets in different colors in the same PCP? #36

Closed Karlo-Emilo closed 9 months ago

Karlo-Emilo commented 10 months ago

Is it possible to have multiple datasets in different colors in the same PCP?

(In the newest version)

I remember that I have tried to use this library before to find out that it is not possible. But I may be wrong.

sgratzl commented 10 months ago

no since a chart.js dataset is already being used to represent one axis.

Karlo-Emilo commented 10 months ago

Thanks for the reply @sgratzl

Do you know of another way to separate the data into different color groups?

sgratzl commented 9 months ago

just published a patched version. now you should be able to define a context function similar to

borderColor: (ctx) => ctx.dataIndex < 10 ? 'red' : 'blue'
Karlo-Emilo commented 9 months ago

How cool! Looking forward to try it out. It may be a few weeks before I find the time, but I will let you know how well it worked for me if you do not close the issue.

Thanks for taking the time to do this! It is very much appreciated.