Home forums Using CanvasJS Title and subtitles not showing Reply To: Title and subtitles not showing

#14005

cshickman
Member

Here is what I did:

1. Open an instance of Visual Studio 2010.
2. Created an ASP.NET Empty Web Application.
3. Added an HTML page (I named it DonutTest.htm”)
4. Replaced the HTML file contents with:

<!DOCTYPE HTML>
<html>
<head>
  <script type="text/javascript">
      window.onload = function () {
          var chart = new CanvasJS.Chart("chartContainer",
    {
        interactivityEnabled: false,
        backgroundColor: "transparent",
        title: {
            text: "Test",
            fontColor: "black"
        },
        subtitles: [
		{
		    text: "7",
		    verticalAlign: "center",
		    horizontalAlign: "center",
		    fontFamily: "tahoma",
		    fontSize: "16",
		    fontColor: "black"
		}
		],
        creditText: false,
        data: [
      {
          type: "doughnut",
          startAngle: 270,
          dataPoints: [
         { y: 7, color: "#00a04a" },
         { y: 3, color: "#fdc02b" }
       ]
      }
     ]
    });
          chart.render();
      }
  </script>
  <script src="canvasjs.min.js" type="text/javascript"></script>
</head>
  <body>
    <div id="chartContainer" style="height: 300px; width: 300px">
    </div>
  </body>
 </html>

4. Added an existing item to the project (canvasjs.min.js).
5. Started debugging.
6. I see the donut chart, but no text.

When I start debugging, the version of IE being emulated is Edge, according to the IE debugger. But the about window says Internet Explorer version 11.0.9600.18537CO. Update Versions 11.0.38.

I still see the “Trial Version” text however.

I see the same result if I use Debug>Start Without Debugging.

I also sent the project to one of my co-workers. He got the same result as I did.

If I use the debugger to see what is actually contained in the “chart” variable, I can see where the properties have been assigned in chart.options.subtitles[0] and chart.options.title. Does that sound right?

I work for a high-security government complex. Is it possible my network could be blocking a feature or something? It seems unlikely, but crazier things have happened…