Home Forums Chart Support Display HTML values in canvas chart

Display HTML values in canvas chart

Viewing 2 posts - 1 through 2 (of 2 total)
  • #10110

    I’ve recently started looking into canvasjs and i think it’s great. I’m using the following JavaScript and HTML code. I currently have the bar chart displaying set results. How can i change this to display the values which are displayed in the HTML div’s (test and duration). I want to try and put these values into the chart? these values come from local storage and i have them displaying on the HTML page. Can someone please help me?

          data: [
            type: "bar",
            showInLegend: true,
            name: "Black",
            color: "#000000",
            dataPoints: [
            { y: 0.18, label: "Test"},
            { y: 0.12, label: "Test 1"},
            { y: 0.59, label: "Test 2"},        
            { y: 1.15, label: "Test 3"},        
            <div id="bar">
    			<div id="chartContainer" style="height: 300px; width: 100%;"></div>
    		  <div id="startTime">
    		<div id="startDate">
    		<div id="duration">
    		<div id="test">
    • This topic was modified 8 years, 2 months ago by user864731537.

    Here is an example where you can access data from HTML and pass it to chart.

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

You must be logged in to reply to this topic.