Skip to content

NeilMacMullen/VegaGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VegaGenerator

A library to help generate VegaLite charts from C# code.

See the included Demo app for examples

Illustrative code

var data = new List<OrderedDictionary>();
// populate data with an OrderedDicionary per point, "x"=> xValue, "y" => yValue, "series"=>seriesName

//for a chart where X values are DateTimes and Y are numeric....
var spec = VegaChart.CreateVegaChart(
             VegaMark.Line,
             new ColumnDescription("x", "x", VegaAxisType.Temporal),
             new ColumnDescription("y", "y", VegaAxisType.Quantitative),
             new ColumnDescription("series", "series", VegaAxisType.Nominal)
         )
        .InjectData(data) //add the data 
        .UseCursorTooltip()
        .SetTitle("Demo Chart")
        .FillContainer(); 

//generate the html and display it
var html = VegaMaker.MakeHtml("demo", spec.Serialize(),"dark");

image

About

High level API to create VegaLite charts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages