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

Seven Deadly Sins Rated
Sloth: Sloth is cheap, and easy to get. B+

Gluttony: Gluttony can be hard work. C+

Wrath: Unsociable, bad on the nerves, and drives property values down. D

Lust: Ah, lust. Putting the "deadly" back into the Seven Deadly Sins. B

Pride: My high school counselors were always pushing self-esteem on me. Were they pawns of the Adversary? C

Envy: All you have to do is covet something of someone else's and boom, you're a brimstone hors d'oeuvre. C-

Avarice: Greedy people inevitably end up looking goofy in public. D


Lore Fitzgerald Sjöberg



Navigation





<December 2023>
SMTWTFS
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

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 - 11/30/2023

Totals
Posts - 2652
Comments - 2670
Hits - 2,621,085

Averages
Entries/day - 0.36
Comments/entry - 1.01
Hits/day - 351

Updated every 30 minutes. Last: 11:22 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]   ,

|