About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 30 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Google Ads

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

There are two kinds of geniuses, the “ordinary” and the “magicians.” An ordinary genius is a fellow that you and I would be just as good as, if we were only many times better. There is no mystery as to how his mind works. Once we understand what they have done, we feel certain that we, too, could have done it. It is different with the magicians. They are, to use mathematical jargon, in the orthogonal complement of where we are and the working of their minds is for all intents and purposes incomprehensible. Even after we understand what they have done, the process by which they have done it is completely dark. They seldom, if ever, have students because they cannot be emulated and it must be terribly frustrating for a brilliant young mind to cope with the mysterious ways in which the magician’s mind works. Richard Feynman is a magician of the highest caliber.

Mark Kac (quoted by James Gleick)



Navigation





<September 2023>
SMTWTFS
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact Me

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 6/27/2023

Totals
Posts - 2648
Comments - 2661
Hits - 2,598,684

Averages
Entries/day - 0.36
Comments/entry - 1.00
Hits/day - 352

Updated every 30 minutes. Last: 9:50 PM Pacific


  11:22 PM

The ASP.NET Chart helper displays charts, as you can read in the chapter Displaying Data in a Chart:


For purposes of the Chart helper, you specify the chart type (bar, line, area, etc.) by passing the chartType parameter to the AddSeries method:

@{ 
var key = new Chart(width: 600, height: 400)
.AddTitle("Chart Title")
.AddSeries(
chartType: "Pie",
name: "Employee",
xValue: new[] { "Peter", "Andrew", "Julie", "Mary", "Dave" },
yValues: new[] { "2", "6", "4", "5", "3" })
.Write();
}
But this is just a string, so it's not clear what-all you can pass for the chartType value. Unless you happen to know that the Chart helper is actually a wrapper around the ASP.NET Chart control. If you know that, you can find the documentation for that dude (it's in a downloadable .chm file)[1] and learn that SeriesChartType enumeration supports the following:

Area
Bar
BoxPlot
Bubble
Candlestick
Column
Doughnut
ErrorBar
FastLine
FastPoint
Funnel
Kagi
Line
Pie
Point
PointAndFigure
Polar
Pyramid
Radar
Range
RangeBar
RangeColumn
Renko
Spline
SplineArea
SplineRange
StackedArea
StackedArea100
StackedBar
StackedBar100
StackedColumn
StackedColumn100
StepLine
Stock
ThreeLineBreak

I haven't tried all of them, but basically this is the list of names that you can pass, as strings, to the Chart helper in a Razor page. Actually sorting out what all these chart types are for and how they relate to your data series is, for the time being, left as an exercise for the reader.


[1] Or use the Object Browser in Visual Studio -- you're looking for System.Web.UI.DataVisualization.Charting.SeriesChartType.

[categories]   ,

|