ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexChart

Bubble

This sample demonstrates how to export a wijmo5 bubble FlexChart to image file.

Features

02468101214161820222426280510

Settings

Export
Export Format : Height :
Width :
Export Name :

Description

This sample demonstrates how to export a wijmo5 bubble FlexChart to image file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace WebApiExplorer.Controllers
{
    public partial class Wijmo5FlexChartController : Controller
    {
        public ActionResult Bubble()
        {
            ViewBag.Options = _flexChartModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@using WebApiExplorer.Models
@{
    ImageExportOptions optionsModel = ViewBag.Options;
    ViewBag.DemoSettings = true;
}
 
<div id="@(optionsModel.ControlId)" ></div>
 
@section Settings{
    @Html.Partial("_ImageExportOptions", optionsModel)
}
 
<script>
    var chart = new wijmo.chart.FlexChart('#@(optionsModel.ControlId)');
 
    chart.initialize({
        chartType: "Bubble",
        itemsSource: [],
        bindingX: 'x',
        series: [
            { binding: 'y,size' }
        ]
    });
 
    for (var i = 0; i < 30; i++) {
        chart.itemsSource.push({
            x: i,
            y: Math.random() * 10,
            size: Math.random() * 100
        });
    }
</script>
 
@section Description{
    @Html.Raw(Resources.Wijmo5FlexChart.Bubble_Text0)
}