You must be logged in to post your query.
Home › Forums › Chart Support › Errors in the chart
I have a problem with displaying the chart correctly:
1) lack of line continuity through additional points on the chart:
2) Date range problem. The chart shows data from February 5, 2023 to May 28, 2023. The data is from January 5, 2023 to April 28, 2023. It turns out that there is a shift in the chart of + 1 month in relation to the input data
input data:
… name: “Portfel”, type: “line”, lineThickness: 4, color: “#ec0000”, lineColor: “#ec0000”, yValueFormatString: “#0.# %”, showInLegend: true, dataPoints: [
{ x: new Date(2023,01,05), y: .000000000000000000 },
{ x: new Date(2023,01,09), y: .013316087242179000 },
{ x: new Date(2023,01,10), y: .012882340994830000 },
{ x: new Date(2023,01,11), y: .018815078035308000 },
{ x: new Date(2023,01,12), y: .020938052879762000 },
{ x: new Date(2023,01,13), y: .021182362324071000 },
{ x: new Date(2023,01,16), y: .022521952887386000 },
{ x: new Date(2023,01,17), y: .024610608751092000 },
{ x: new Date(2023,01,18), y: .023859925315397000 },
{ x: new Date(2023,01,19), y: .020569711504219000 },
{ x: new Date(2023,01,20), y: .026934615035553000 },
{ x: new Date(2023,01,23), y: .034955314800418000 },
{ x: new Date(2023,01,24), y: .034581360735425000 },
{ x: new Date(2023,01,25), y: .034811366801044000 },
{ x: new Date(2023,01,26), y: .041689792459859000 },
{ x: new Date(2023,01,27), y: .044953117890392000 },
{ x: new Date(2023,01,30), y: .037439742411978000 },
{ x: new Date(2023,01,31), y: .042014947399098000 },
{ x: new Date(2023,02,01), y: .049271767225452000 },
{ x: new Date(2023,02,02), y: .062984205402872000 },
{ x: new Date(2023,02,03), y: .058287409598724000 },
{ x: new Date(2023,02,06), y: .051825904749648000 },
{ x: new Date(2023,02,07), y: .056080340765256000 },
{ x: new Date(2023,02,08), y: .053280684074274000 },
{ x: new Date(2023,02,09), y: .053261946330738000 },
{ x: new Date(2023,02,10), y: .047540560803989000 },
{ x: new Date(2023,02,13), y: .049541228518131000 },
{ x: new Date(2023,02,14), y: .051576807951624000 },
{ x: new Date(2023,02,15), y: .054815014048128000 },
{ x: new Date(2023,02,16), y: .047224819889905000 },
{ x: new Date(2023,02,17), y: .042196466177521000 },
{ x: new Date(2023,02,20), y: .041578930048629000 },
{ x: new Date(2023,02,21), y: .034144713008497000 },
{ x: new Date(2023,02,22), y: .037292777317586000 },
{ x: new Date(2023,02,23), y: .041116731588165000 },
{ x: new Date(2023,02,24), y: .037860206564713000 },
{ x: new Date(2023,02,27), y: .039399903241201000 },
{ x: new Date(2023,02,28), y: .040873511077443000 },
{ x: new Date(2023,03,01), y: .039559528170571000 },
{ x: new Date(2023,03,02), y: .041702278697145000 },
{ x: new Date(2023,03,03), y: .049664406853588000 },
{ x: new Date(2023,03,06), y: .053021329029481000 },
{ x: new Date(2023,03,07), y: .051583820940197000 },
{ x: new Date(2023,03,08), y: .056276298005684000 },
{ x: new Date(2023,03,09), y: .053295212143357000 },
{ x: new Date(2023,03,10), y: .048388321254952000 },
{ x: new Date(2023,03,13), y: .051568882737269000 },
{ x: new Date(2023,03,14), y: .057084786447143000 },
{ x: new Date(2023,03,15), y: .058228905099197000 },
{ x: new Date(2023,03,16), y: .068028148324633000 },
{ x: new Date(2023,03,17), y: .070142718947685000 },
{ x: new Date(2023,03,20), y: .070533231429844000 },
{ x: new Date(2023,03,21), y: .071789288234832000 },
{ x: new Date(2023,03,22), y: .068690166793734000 },
{ x: new Date(2023,03,23), y: .076471985447328000 },
{ x: new Date(2023,03,24), y: .073572434328021000 },
{ x: new Date(2023,03,27), y: .070908396691846000 },
{ x: new Date(2023,03,28), y: .068269818272826000 },
{ x: new Date(2023,03,29), y: .073140570930183000 },
{ x: new Date(2023,03,30), y: .077816534378528000 },
{ x: new Date(2023,03,31), y: .084020846122156000 },
{ x: new Date(2023,04,03), y: .083324083673616000 },
{ x: new Date(2023,04,04), y: .082163813518088000 },
{ x: new Date(2023,04,05), y: .079303869319139000 },
{ x: new Date(2023,04,06), y: .081547655454551000 },
{ x: new Date(2023,04,11), y: .077082707433613000 },
{ x: new Date(2023,04,12), y: .076396187314683000 },
{ x: new Date(2023,04,13), y: .083278553179913000 },
{ x: new Date(2023,04,14), y: .083380421201796000 },
{ x: new Date(2023,04,17), y: .083916445504326000 },
{ x: new Date(2023,04,18), y: .084529919080843000 },
{ x: new Date(2023,04,19), y: .082781327789421000 },
{ x: new Date(2023,04,20), y: .081938955585844000 },
{ x: new Date(2023,04,21), y: .083385777724784000 },
{ x: new Date(2023,04,24), y: .081657855155736000 },
{ x: new Date(2023,04,25), y: .077836135031107000 },
{ x: new Date(2023,04,26), y: .079538675344556000 },
{ x: new Date(2023,04,27), y: .087636717301912000 },
{ x: new Date(2023,04,28), y: .090480897806136000 },] }, …
1) lack of line continuity through additional points on the chart:
Can you please brief us more about your query, so that we can understand it better and help you out. Also, it would be great if you could create a jsfiddle reproducing the issue that you are facing so that we can look into it and help you out.
2) Date range problem. The chart shows data from February 5, 2023 to May 28, 2023. The data is from January 5, 2023 to April 28, 2023. It turns out that there is a shift in the chart of + 1 month in relation to the input data
CanvasJS is a JavaScript library and follows JavaScript Date-Formats where month starts from 0(January) and ends at 11(December). However, you can use ISO format to pass month from 1 to 12 (Example: “2015-03-25” is considered as March 25, 2015).
__
Rohith Nagaral
Team CanvasJS
You must be logged in to reply to this topic.