ChartJS – Different color per data point

In updating to version 2.2.2 of ChartJS, I found that the accepted answer no longer works. The datasets will take an array holding styling information for the properties. In this case: var pointBackgroundColors = []; var myChart = new Chart($(‘#myChart’).get(0).getContext(‘2d’), { type: ‘line’, data: { datasets: [ { data: dataPoints, pointBackgroundColor: pointBackgroundColors } ] } … Read more

Remove line through legend marker with .plot

You can specify linestyle=”None” or linestyle=”” as a keyword argument in the plot command. Also, ls= can replace linestyle=. import matplotlib.pyplot as plt fig, ax = plt.subplots() for i, (mark, color) in enumerate(zip( [‘s’, ‘o’, ‘D’, ‘v’], [‘r’, ‘g’, ‘b’, ‘purple’])): ax.plot(i+1, i+1, color=color, marker=mark, markerfacecolor=”None”, markeredgecolor=color, linestyle=”None”, label=i) ax.set_xlim(0, 5) ax.set_ylim(0, 5) ax.legend(numpoints=1) plt.show() … Read more

MPAndroidChart hide background grid

Use this: mChart.getAxisLeft().setDrawGridLines(false); mChart.getXAxis().setDrawGridLines(false); Please note you may need right axis or both of them. It depends on axis you are actually using. UPDATE: Is it axis line? If it is, then simply chart.getXAxis().setEnabled(false) Also possible: chart.getAxisLeft().setDrawAxisLine(false)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)