#import <UIKit/UIKit.h>
#import <Highcharts/Highcharts.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
HIChartView *chartView = [[HIChartView alloc] initWithFrame:self.view.bounds];
HIOptions *options = [[HIOptions alloc] init];
HIChart *chart = [[HIChart alloc] init];
chart.type = @"line";
chart.zoomType = @"x";
HIBoost *boost = [[HIBoost alloc] init];
boost.useGPUTranslations = [[NSNumber alloc] initWithBool:true];
HITitle *title = [[HITitle alloc] init];
title.text = @"Highcharts drawing 500 points";
HISubtitle *subtitle = [[HISubtitle alloc] init];
subtitle.text = @"Using the Boost module";
HITooltip *tooltip = [[HITooltip alloc] init];
tooltip.valueDecimals = @2;
HILine *line = [[HILine alloc] init];
line.data = [self data];
line.lineWidth = @0.5;
options.chart = chart;
options.boost = boost;
options.title = title;
options.subtitle = subtitle;
options.tooltip = tooltip;
options.series = [NSMutableArray arrayWithObjects:line, nil];
chartView.options = options;
[self.view addSubview:chartView];
}
-(NSArray*)data {
return @[@[@0,@12.557564682834604],@[@1,@2.954954568997685],@[@2,@2.650614412376382],@[@3,@2.935986539656388],@[@4,@2.799955259382895],@[@5,@3.0253002607243227],@[@6,@2.826788266260321],@[@7,@3.534352657210822],@[@8,@3.158570654889034],@[@9,@2.9742357772954096],@[@10,@3.5655096151563344],@[@11,@3.5844808487113826],@[@12,@3.526490884547252],@[@13,@3.6660780920623157],@[@14,@3.211173094578441],@[@15,@2.9804793586406464],@[@16,@2.9922350649895986],@[@17,@3.4438849441266264],@[@18,@3.0158662941860745],@[@19,@3.5592410726274517],@[@20,@3.1652020867271697],@[@21,@3.421962704778212],@[@22,@2.9403989067900507],@[@23,@3.2836156326816304],@[@24,@3.6608793438378338],@[@25,@3.178548293193466],@[@26,@3.8048896542784987],@[@27,@3.760867693286227],@[@28,@3.9777172686482887],@[@29,@3.281705031302154],@[@30,@3.6445432446971684],@[@31,@3.974112995866681],@[@32,@3.7687745282517904],@[@33,@3.260503643552789],@[@34,@3.8206327968455662],@[@35,@3.7910097486843606],@[@36,@3.681969611807374],@[@37,@3.623525412665809],@[@38,@3.3965504966806064],@[@39,@4.201789480320873],@[@40,@3.5194548943912616],@[@41,@4.188599707588715],@[@42,@3.8179204113384486],@[@43,@3.9396321334364983],@[@44,@3.4372922480128763],@[@45,@3.4749293179809517],@[@46,@3.7959126679588415],@[@47,@3.9852927470262607],@[@48,@4.299356544595508],@[@49,@3.980537701408487],@[@50,@3.694044703087655],@[@51,@4.1825132517206],@[@52,@3.6078457048713606],@[@53,@3.6854236757856746],@[@54,@3.665827927741201],@[@55,@4.126087728592868],@[@56,@4.201315935564773],@[@57,@4.202456359972212],@[@58,@4.4509117699985925],@[@59,@3.9415530574363355],@[@60,@3.6753058649026467],@[@61,@3.7471015525993008],@[@62,@3.6608216973704195],@[@63,@3.922177226274193],@[@64,@4.5149826359214185],@[@65,@4.091202280627527],@[@66,@4.007327012027205],@[@67,@3.925196525709473],@[@68,@4.478850815865613],@[@69,@4.671133518067176],@[@70,@3.796365882021058],@[@71,@3.8223112707801405],@[@72,@4.438571480055822],@[@73,@4.613052539846249],@[@74,@3.9649086628322996],@[@75,@3.8261277391994972],@[@76,@3.9919647054252207],@[@77,@4.755906147668439],@[@78,@4.769152580331253],@[@79,@4.177172008790185],@[@80,@4.631611818280839],@[@81,@4.434184657758337],@[@82,@3.9783990151445634],@[@83,@4.692160777868018],@[@84,@4.6336893782136235],@[@85,@4.017471639895631],@[@86,@4.8816392246531235],@[@87,@4.108482867595746],@[@88,@4.397706948293705],@[@89,@4.57200262336867],@[@90,@4.959254424350507],@[@91,@4.366024525623236],@[@92,@4.7147801183480595],@[@93,@4.454570378120447],@[@94,@5.068980270254999],@[@95,@4.190000988467599],@[@96,@4.693682399547822],@[@97,@4.801554627227309],@[@98,@4.3151517558271975],@[@99,@4.852644655837378],@[@100,@4.684743270527492],@[@101,@4.757726663128833],@[@102,@4.914775348470477],@[@103,@5.365166204861227],@[@104,@4.878317488802394],@[@105,@4.698131159009373],@[@106,@4.721242123736114],@[@107,@4.6386102101500635],@[@108,@5.491618224985484],@[@109,@5.174553540269171],@[@110,@4.943187328270239],@[@111,@5.018376789374338],@[@112,@5.414988069852551],@[@113,@4.80293927430022],@[@114,@5.485645852234381],@[@115,@4.683457021140216],@[@116,@5.065890655184863],@[@117,@5.471689770827069],@[@118,@5.593005873719168],@[@119,@5.00970763497218],@[@120,@5.5550408371887325],@[@121,@4.984765748703025],@[@122,@5.572838895905043],@[@123,@4.962482938921501],@[@124,@5.008413881424478],@[@125,@5.065807067674117],@[@126,@5.202556266374184],@[@127,@4.967624843160388],@[@128,@5.390553024131254],@[@129,@5.655246695582789],@[@130,@5.393814302122664],@[@131,@5.547993649821959],@[@132,@5.4631003920242085],@[@133,@5.642668533006598],@[@134,@5.0900336634824574],@[@135,@5.476815663456991],@[@136,@5.079744968225272],@[@137,@4.967126817501686],@[@138,@5.2864216803934605],@[@139,@4.912799181008659],@[@140,@5.776745650341469],@[@141,@5.563791987562948],@[@142,@4.89343499015657],@[@143,@5.112398560512602],@[@144,@5.152470711583749],@[@145,@5.2944282760905175],@[@146,@5.360724960187082],@[@147,@5.468449295395926],@[@148,@5.456174003792332],@[@149,@5.201646857906776],@[@150,@5.006424482870149],@[@151,@5.365840939090911],@[@152,@4.852804461291532],@[@153,@4.984958524883998],@[@154,@5.29939576075275],@[@155,@5.214403452968256],@[@156,@5.175620582553853],@[@157,@5.357756717751514],@[@158,@5.4279693264713185],@[@159,@5.6837115882938],@[@160,@5.0379997798769205],@[@161,@5.63650919127595],@[@162,@4.920421427760764],@[@163,@5.668194853862688],@[@164,@4.97772657698911],@[@165,@4.8371082384927195],@[@166,@5.350977838941004],@[@167,@5.691246681151853],@[@168,@5.251412520069198],@[@169,@5.097319002313165],@[@170,@5.704845498537637],@[@171,@4.894232353195838],@[@172,@5.685198534045952],@[@173,@5.083735049458031],@[@174,@5.1337724981185175],@[@175,@5.136495238380372],@[@176,@5.292162099804286],@[@177,@5.52215434804447],@[@178,@5.725760641456696],@[@179,@5.156496211463094],@[@180,@5.001880406241273],@[@181,@5.748326434578525],@[@182,@5.385269267389516],@[@183,@5.6025098220584315],@[@184,@4.8990627859010605],@[@185,@4.794638523814866],@[@186,@5.420939251440309],@[@187,@5.40894887394703],@[@188,@4.968984591649189],@[@189,@5.715282755624482],@[@190,@4.79509077678663],@[@191,@5.008995975541229],@[@192,@5.2242528573273495],@[@193,@4.900565870244954],@[@194,@4.99706295995077],@[@195,@4.734425366830823],@[@196,@4.973350953492598],@[@197,@5.299788274845093],@[@198,@4.714035633423117],@[@199,@5.648450775722389],@[@200,@4.465855416114929],@[@201,@4.311037403155124],@[@202,@4.917916199250928],@[@203,@4.779420782193956],@[@204,@5.033565656690024],@[@205,@4.313682536609071],@[@206,@4.977756581956552],@[@207,@5.227159100793676],@[@208,@5.133894670446223],@[@209,@4.3394835002053815],@[@210,@5.066833836804908],@[@211,@4.413056577117164],@[@212,@4.5451737077527214],@[@213,@5.1739979316641],@[@214,@4.6742059819727935],@[@215,@4.932962750888831],@[@216,@4.712993567636724],@[@217,@4.699738466364718],@[@218,@4.243220259757539],@[@219,@4.864496146175399],@[@220,@4.335884059426109],@[@221,@4.87497308494034],@[@222,@4.766712015078735],@[@223,@4.619541260216413],@[@224,@4.306678448930404],@[@225,@4.1438499451860675],@[@226,@4.546814591277889],@[@227,@4.143936031259128],@[@228,@4.327505145923538],@[@229,@4.847385060534508],@[@230,@4.2186037297808205],@[@231,@4.4607664674770255],@[@232,@4.86786418662885],@[@233,@4.668441952931517],@[@234,@4.191560225776822],@[@235,@4.729434218635461],@[@236,@3.946371280391892],@[@237,@3.973162594364445],@[@238,@3.891729241464907],@[@239,@4.4629410231903845],@[@240,@4.744173555156983],@[@241,@3.9846915547470108],@[@242,@4.223374489806554],@[@243,@3.8611774744598018],@[@244,@4.459435475512064],@[@245,@4.337774531937318],@[@246,@3.9120509184370182],@[@247,@4.298059536787759],@[@248,@4.550309435305736],@[@249,@4.465851424380747],@[@250,@4.1849014790829235],@[@251,@3.69202080402564],@[@252,@4.33583875623188],@[@253,@4.2433338312012525],@[@254,@3.971006799828978],@[@255,@4.31663047261519],@[@256,@4.463679780581781],@[@257,@4.437126446352608],@[@258,@3.6425252385036795],@[@259,@4.396358729741837],@[@260,@4.4172061433598575],@[@261,@4.377074399986406],@[@262,@4.404604356236395],@[@263,@3.967430849291759],@[@264,@4.138182583927237],@[@265,@4.130727996833801],@[@266,@3.517634850907019],@[@267,@3.7090684647899774],@[@268,@3.694809921292884],@[@269,@3.492883568399723],@[@270,@4.187621232708048],@[@271,@3.484133881905544],@[@272,@4.237196257064294],@[@273,@3.704844237654471],@[@274,@3.616267559600934],@[@275,@4.2395706216575535],@[@276,@3.583342916444006],@[@277,@4.012799504554961],@[@278,@3.4214828512687085],@[@279,@4.127583866251606],@[@280,@3.166069922604282],@[@281,@3.236118351407497],@[@282,@3.2198691765765806],@[@283,@3.62982923288283],@[@284,@3.1789937465339526],@[@285,@3.493787321698642],@[@286,@3.8402427203880083],@[@287,@3.5519447451586856],@[@288,@3.0781085163263584],@[@289,@3.84754473056222],@[@290,@3.4130252604946225],@[@291,@3.8299785266035005],@[@292,@3.0121571789891095],@[@293,@3.250071880502374],@[@294,@3.870355539448509],@[@295,@2.951473609874788],@[@296,@3.6499942364839346],@[@297,@3.0701057335539947],@[@298,@3.444772107744765],@[@299,@2.8479352573400454],@[@300,@3.1871784586131033],@[@301,@3.3043971977376576],@[@302,@3.7991929479748103],@[@303,@3.436591503256641],@[@304,@3.3220357630177766],@[@305,@3.4443151338079763],@[@306,@3.5235505565087393],@[@307,@3.808954128103787],@[@308,@3.6067509935856723],@[@309,@3.2000047269052914],@[@310,@3.8293991450688845],@[@311,@3.748328760215049],@[@312,@3.5826800573109563],@[@313,@3.007256126107295],@[@314,@3.7293204728229083],@[@315,@3.2031406259025803],@[@316,@2.8347666763646893],@[@317,@3.034376989689249],@[@318,@2.9270122012409634],@[@319,@3.0272463826286558],@[@320,@3.716945056340964],@[@321,@3.5230948817144543],@[@322,@3.4984232389201133],@[@323,@3.612542690043732],@[@324,@2.752132741965923],@[@325,@3.0600979998348063],@[@326,@2.7921249041552745],@[@327,@2.7799103956244666],@[@328,@3.5846866140122677],@[@329,@2.672394846359734],@[@330,@2.81598617151188],@[@331,@3.283055893509247],@[@332,@3.1051963627007195],@[@333,@3.289779950813479],@[@334,@3.402840983954203],@[@335,@3.1444455518349717],@[@336,@2.500278074635798],@[@337,@3.244817483999553],@[@338,@3.1793808364499707],@[@339,@3.2188889676163006],@[@340,@2.8775822398391107],@[@341,@3.2919785655186318],@[@342,@3.292854747905808],@[@343,@2.302490178588041],@[@344,@3.1649923749343754],@[@345,@2.6365237030462896],@[@346,@2.5597860204229113],@[@347,@2.278414671616031],@[@348,@3.1464823013409267],@[@349,@2.311641259051888],@[@350,@3.158614250309223],@[@351,@2.2132201222607035],@[@352,@2.2023938521030977],@[@353,@2.776585847804775],@[@354,@2.598219995916393],@[@355,@2.6941721614060152],@[@356,@2.7711014240994487],@[@357,@2.3533293804326623],@[@358,@2.2902646638863824],@[@359,@2.677346194655206],@[@360,@1.992997045443348],@[@361,@2.4140660532643947],@[@362,@2.6222302623858043],@[@363,@2.6479817034317756],@[@364,@2.254335673354844],@[@365,@2.020071658577417],@[@366,@2.5217898723627874],@[@367,@2.610928273231202],@[@368,@2.0860823617268336],@[@369,@1.9589942676528738],@[@370,@2.3779730472461824],@[@371,@2.168063680599415],@[@372,@2.250203144891443],@[@373,@2.1204193896219574],@[@374,@1.936367016243398],@[@375,@1.791403376690344],@[@376,@1.8753037333028364],@[@377,@2.449452309761861],@[@378,@2.1491486735909584],@[@379,@2.189056866136264],@[@380,@2.507654515233756],@[@381,@2.328899506401838],@[@382,@2.4130725815994927],@[@383,@2.285331769094468],@[@384,@1.7151672928046744],@[@385,@1.799161643875224],@[@386,@1.9994462007526104],@[@387,@2.0662275977142084],@[@388,@1.8814871218567508],@[@389,@2.118910488722444],@[@390,@2.399872790928764],@[@391,@1.763186921281933],@[@392,@2.3809531391304226],@[@393,@1.51878767482521],@[@394,@1.8793459283980938],@[@395,@1.892902089133063],@[@396,@1.8813613547655206],@[@397,@1.548979850565034],@[@398,@2.0964906115503155],@[@399,@2.0220077019065146],@[@400,@1.7907808887036303],@[@401,@1.7859767152071713],@[@402,@1.7054272176916565],@[@403,@2.210070059931003],@[@404,@1.6360774467859445],@[@405,@1.9619167113011673],@[@406,@2.3303310113698985],@[@407,@1.7166163189107349],@[@408,@1.998242846542021],@[@409,@1.7087217520440927],@[@410,@1.6240271950045377],@[@411,@1.4897606568845276],@[@412,@1.8453423262590762],@[@413,@2.168335829073218],@[@414,@1.7469315788630189],@[@415,@1.9487003093858912],@[@416,@2.28939051414721],@[@417,@2.1577345240500545],@[@418,@1.6734558256306928],@[@419,@2.2502315153612864],@[@420,@1.4115682738953064],@[@421,@1.8414181075584086],@[@422,@1.9941002878077114],@[@423,@2.0130505169949293],@[@424,@1.4214515361673896],@[@425,@1.5384278134070377],@[@426,@2.1832914822403593],@[@427,@2.2507945372461915],@[@428,@1.933100982738239],@[@429,@1.87983883564976],@[@430,@1.6918828117074827],@[@431,@2.203070266574686],@[@432,@2.062298604916789],@[@433,@1.457395038064458],@[@434,@1.4399020019772046],@[@435,@1.5270025772421405],@[@436,@1.6223004705677257],@[@437,@1.347577425065876],@[@438,@1.9213093163880204],@[@439,@1.5989506632005916],@[@440,@1.298677612297125],@[@441,@1.5231323142596427],@[@442,@1.75736135894001],@[@443,@2.003499650966095],@[@444,@1.6255379989893848],@[@445,@1.5351532322598944],@[@446,@1.357406657519229],@[@447,@1.7540589522990162],@[@448,@1.548398145840553],@[@449,@1.5193998901312762],@[@450,@1.90295305566887],@[@451,@1.8995726995708953],@[@452,@1.2518957352374191],@[@453,@1.3073734327894662],@[@454,@1.6924740053058747],@[@455,@2.087943598309174],@[@456,@2.052843167100113],@[@457,@1.195101602405436],@[@458,@1.8189464621138987],@[@459,@1.5280905842924137],@[@460,@1.7897106776468852],@[@461,@1.87529447182582],@[@462,@1.4229036183513273],@[@463,@1.6801931539963268],@[@464,@1.6292725838617408],@[@465,@1.1414796956695503],@[@466,@1.667978406850981],@[@467,@1.590412534811978],@[@468,@1.8897886590248305],@[@469,@1.3880810598145719],@[@470,@1.2453640981113359],@[@471,@1.50505536489012],@[@472,@1.3572333493503241],@[@473,@1.3200412876329102],@[@474,@2.0283234789751563],@[@475,@1.2939920142182104],@[@476,@1.6676105495579931],@[@477,@1.4704010674118317],@[@478,@1.1536597544487908],@[@479,@1.8889385336449505],@[@480,@1.1844409404952763],@[@481,@1.4037164380973244],@[@482,@2.0906164096123403],@[@483,@2.013389123776764],@[@484,@1.9121171003267659],@[@485,@1.9641003275481606],@[@486,@1.8314651861213591],@[@487,@1.1984961061586437],@[@488,@1.7885621822201299],@[@489,@1.864696456726055],@[@490,@1.5853396443900252],@[@491,@1.275124232936349],@[@492,@1.384754829524381],@[@493,@1.3849022807888967],@[@494,@2.124904687610696],@[@495,@1.8620601902850078],@[@496,@1.920471914570312],@[@497,@1.2136791352730245],@[@498,@1.432705159144667],@[@499,@2.048125275400314]];
}
@end