Forum Replies Created by mmfc

Viewing 6 posts - 1 through 6 (of 6 total)
  • in reply to: date time formatting issues #10336

    I’ve mostly resolved my issue now –

    toolTip: { contentFormatter: function(e) { return CanvasJS.formatDate(e.entries[0].dataPoint.label, "DD/MM/YYYY HH:mm")+": "+e.entries[0].dataPoint.y; },
    http://jsfiddle.net/4bc9v3hd/27/

    Displays the text formatted correctly.

    Could you point me in the direction of the colours etc to make it match the rest of theme1?

    in reply to: date time formatting issues #10333

    Further to that – using toolTip: {contentFormatter: function(e) {return CanvasJS.formatDate(e.value, "DD/MM/YYYY HH:mm");},
    formats it correctly, but removes the y value (and the {label} the value is now. Adding content: "{label}: {y}" doesn’t add the y value either.

    • This reply was modified 7 years, 11 months ago by mmfc.
    • This reply was modified 7 years, 11 months ago by mmfc.
    in reply to: date time formatting issues #10332

    What is the syntax for formatting toolTipContent – i.e. {label} shows the same effect, {label: ‘formatstring’} shows no specific formatting either?

    in reply to: date time formatting issues #10183

    Brilliant, that has fixed the x axis issue. However the toltip still shows the full ISO date – I tried using xValueFormatString in data or valueFormatString in axisX to format this as “DD/MM/YYYY HH:mm” but neither affect it. Am i trying to format it in the wrong way?

    Thanks!

    in reply to: date time formatting issues #10164

    Fiddle won’t let me use jquery.canvasjs.min.js as a http external resource (from here: https://cdn.canvasjs.com/jquery.canvasjs.min.js) so I can’t replicate the issue with my fiddle.

    HOWEVER – copy and pasting my code incl the data into your fiddle replicates the issue. http://jsfiddle.net/4bc9v3hd/14/

    Note how the tooltip shows the full ISO datetime (I am trying to make it show only the date and time) and the legend shows on 01/01/1970 for all points.

    in reply to: date time formatting issues #10156

    I couldn’t work out a way to upload the csv file, but it follows the format as below: (if you can tell me how to upload it to the fiddle I will)

    2016-04-05 23:03:00,20.8,54.60%

    Inputting that date format into your code works, and prints the date as expected, so I’m unsure as to why it won’t with my code using the same formatting values?

Viewing 6 posts - 1 through 6 (of 6 total)